fastware 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. fastware-0.1.0/.github/workflows/ci.yml +22 -0
  2. fastware-0.1.0/.github/workflows/publish.yml +21 -0
  3. fastware-0.1.0/.gitignore +43 -0
  4. fastware-0.1.0/.rlsbl/bases/.github/workflows/ci.yml +22 -0
  5. fastware-0.1.0/.rlsbl/bases/.github/workflows/publish.yml +21 -0
  6. fastware-0.1.0/.rlsbl/bases/.gitignore +16 -0
  7. fastware-0.1.0/.rlsbl/bases/.rlsbl/changes/unreleased.jsonl +0 -0
  8. fastware-0.1.0/.rlsbl/bases/.rlsbl/lint/python.toml +25 -0
  9. fastware-0.1.0/.rlsbl/bases/CHANGELOG.md +5 -0
  10. fastware-0.1.0/.rlsbl/changes/0.1.0.jsonl +6 -0
  11. fastware-0.1.0/.rlsbl/changes/0.1.0.md +7 -0
  12. fastware-0.1.0/.rlsbl/changes/unreleased.jsonl +0 -0
  13. fastware-0.1.0/.rlsbl/config.json +15 -0
  14. fastware-0.1.0/.rlsbl/hashes.json +8 -0
  15. fastware-0.1.0/.rlsbl/lint/python.toml +25 -0
  16. fastware-0.1.0/.rlsbl/managed-files.json +11 -0
  17. fastware-0.1.0/.rlsbl/releases/v0.1.0.toml +12 -0
  18. fastware-0.1.0/.rlsbl/version +1 -0
  19. fastware-0.1.0/CHANGELOG.md +11 -0
  20. fastware-0.1.0/LICENSE +21 -0
  21. fastware-0.1.0/PKG-INFO +33 -0
  22. fastware-0.1.0/pyproject.toml +39 -0
  23. fastware-0.1.0/src/fastware/__init__.py +104 -0
  24. fastware-0.1.0/src/fastware/__main__.py +8 -0
  25. fastware-0.1.0/src/fastware/app.py +453 -0
  26. fastware-0.1.0/src/fastware/audit.py +49 -0
  27. fastware-0.1.0/src/fastware/auth.py +427 -0
  28. fastware-0.1.0/src/fastware/config.py +40 -0
  29. fastware-0.1.0/src/fastware/dev.py +99 -0
  30. fastware-0.1.0/src/fastware/di.py +110 -0
  31. fastware-0.1.0/src/fastware/error_log.py +107 -0
  32. fastware-0.1.0/src/fastware/features.py +84 -0
  33. fastware-0.1.0/src/fastware/logging.py +140 -0
  34. fastware-0.1.0/src/fastware/mcp.py +205 -0
  35. fastware-0.1.0/src/fastware/middleware.py +559 -0
  36. fastware-0.1.0/src/fastware/request.py +269 -0
  37. fastware-0.1.0/src/fastware/responses.py +222 -0
  38. fastware-0.1.0/src/fastware/routing.py +335 -0
  39. fastware-0.1.0/src/fastware/server.py +653 -0
  40. fastware-0.1.0/src/fastware/sse.py +145 -0
  41. fastware-0.1.0/src/fastware/tasks.py +110 -0
  42. fastware-0.1.0/src/fastware/testing.py +156 -0
  43. fastware-0.1.0/src/fastware/types.py +20 -0
  44. fastware-0.1.0/src/fastware/websocket.py +87 -0
  45. fastware-0.1.0/tests/__init__.py +0 -0
  46. fastware-0.1.0/tests/conftest.py +40 -0
  47. fastware-0.1.0/tests/test_asgi.py +872 -0
  48. fastware-0.1.0/tests/test_dev.py +279 -0
  49. fastware-0.1.0/tests/test_followup.py +716 -0
  50. fastware-0.1.0/tests/test_import.py +5 -0
  51. fastware-0.1.0/tests/test_phase1.py +2002 -0
  52. fastware-0.1.0/tests/test_phase2.py +508 -0
  53. fastware-0.1.0/tests/test_phase3.py +975 -0
  54. fastware-0.1.0/tests/test_phase4.py +847 -0
  55. fastware-0.1.0/tests/test_phase5.py +678 -0
  56. fastware-0.1.0/tests/test_phase6.py +276 -0
  57. fastware-0.1.0/tests/test_phase7.py +485 -0
  58. fastware-0.1.0/tests/test_phase8.py +323 -0
  59. fastware-0.1.0/tests/test_server.py +261 -0
  60. fastware-0.1.0/tests/test_sse.py +261 -0
  61. fastware-0.1.0/uv.lock +1191 -0
@@ -0,0 +1,22 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ # requires-python: >= 3.11
16
+ python-version: ["3.12", "3.13", "3.14"]
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+ - uses: astral-sh/setup-uv@v7
20
+ - run: uv python install ${{ matrix.python-version }}
21
+ - run: uv sync
22
+ - run: uv run python -c "import fastware"
@@ -0,0 +1,21 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: astral-sh/setup-uv@v7
18
+ - run: uv build --out-dir dist
19
+ - uses: pypa/gh-action-pypi-publish@release/v1
20
+ with:
21
+ skip-existing: true
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.pyd
6
+
7
+ # Virtual environments
8
+ .venv/
9
+ venv/
10
+ env/
11
+
12
+ # Distribution / packaging
13
+ dist/
14
+ build/
15
+ *.egg-info/
16
+ *.egg
17
+
18
+ # Testing
19
+ .pytest_cache/
20
+ .coverage
21
+ htmlcov/
22
+
23
+ # IDE
24
+ .idea/
25
+ .vscode/
26
+ *.swp
27
+ *.swo
28
+
29
+ # OS
30
+ .DS_Store
31
+ Thumbs.db
32
+
33
+ node_modules/
34
+ *.log
35
+ coverage/
36
+ .rlsbl-notes-*.tmp
37
+ .rlsbl/lock
38
+ .rlsbl-monorepo/lock
39
+ .credentials.json
40
+ .*-cache.json
41
+ .env
42
+ .env.local
43
+ *.local-only
@@ -0,0 +1,22 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test:
12
+ runs-on: ubuntu-latest
13
+ strategy:
14
+ matrix:
15
+ # requires-python: >= 3.11
16
+ python-version: ["3.12", "3.13", "3.14"]
17
+ steps:
18
+ - uses: actions/checkout@v6
19
+ - uses: astral-sh/setup-uv@v7
20
+ - run: uv python install ${{ matrix.python-version }}
21
+ - run: uv sync
22
+ - run: uv run python -c "import fastware"
@@ -0,0 +1,21 @@
1
+ name: Publish
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+ workflow_dispatch:
7
+
8
+ permissions:
9
+ contents: read
10
+ id-token: write
11
+
12
+ jobs:
13
+ publish:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v6
17
+ - uses: astral-sh/setup-uv@v7
18
+ - run: uv build --out-dir dist
19
+ - uses: pypa/gh-action-pypi-publish@release/v1
20
+ with:
21
+ skip-existing: true
@@ -0,0 +1,16 @@
1
+ node_modules/
2
+ __pycache__/
3
+ *.pyc
4
+ *.log
5
+ .DS_Store
6
+ coverage/
7
+ dist/
8
+ *.egg-info/
9
+ .rlsbl-notes-*.tmp
10
+ .rlsbl/lock
11
+ .rlsbl-monorepo/lock
12
+ .credentials.json
13
+ .*-cache.json
14
+ .env
15
+ .env.local
16
+ *.local-only
@@ -0,0 +1,25 @@
1
+ [forbidden-imports]
2
+ modules = [
3
+ "argparse",
4
+ "click",
5
+ "typer",
6
+ "flask",
7
+ "fastapi",
8
+ "django",
9
+ "uvicorn",
10
+ "granian",
11
+ "starlette",
12
+ "tornado",
13
+ "bottle",
14
+ ]
15
+
16
+ [stdout]
17
+ enabled = true
18
+ ignore = []
19
+
20
+ [entry-point]
21
+ enabled = true
22
+ ignore = []
23
+
24
+ [files]
25
+ exclude = []
@@ -0,0 +1,5 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0
4
+
5
+ - Initial release
@@ -0,0 +1,6 @@
1
+ {"commits":["32b487242e64cfef9c9758d4102ff407d84a15ff","e106bd5e6dbf35af4e089e98a989a82b73bdc25e","de42f980ca0c8b10b19df672a492efffe81fdeba","71328ad4d47944446e1192938423c8c7838a8c43","70269fd879ba7b08ea3828732cfef1247308c972","a5e8f8e4d5a41448bfb239d83f77d68d4300811d","ab38b2f9b9344785f1b669f99ee5c9afc9b933e1","b98661f3acc5646511657ca1ebfa924932cf236f","f42bdea90009698c661222cce857c1ed981fc179","5a29750edffc3f211a6d7d450829856e87f37b8a","d959a5cb2f6c3c974f8c631c27131f5a23d11130","3bf4a79531992b947f8d0ac117d9ae11fe51930a","84af414cc3565944e05fa7e06213d478c417560a","9687659a87bfd8d2e9aa00e49e0e9c0c8937a2c0","4a2e7d704b330b6e062b0a8edf5c1e8c2c57ff3b","a932d81dc274a7e457be653970b7e7a684c6a578","2110a99d8049592e85eafc39fac66fa993f70c5c","5c5deaa20d25de2a4e3c0ba50eab74a0a250a437","ab71b6038474e38d4cf521d0a5d6689427e51682","22d476613fb60ce230901028531a9e53424fa016","9bba8ae433c2a8339851bf8df9be7daf560d7e43","f77eafaf115643d64e34b0f0f7c5ac5468ab9325","f0afeb4014345c9ccf5d4f150a5d8b53a7877589","1bdeadadebfc7ea49408750357f7003ba758c0a1","eac0af3032fb0f34c2c8bcde2bb2c3d842e3035b","f9f250a7aed8b3e87d64460e8f0c04834a8ad139","50982312c146a3f4656b4a3be4427116f9a71c8d","4b378f302e24f04f0266285465cdf9484cbb4015","14d560733511cecb30a4a4172a14571226925d4d"],"user_facing":true,"description":"**Initial release.** ASGI micro-framework: Router, Request/Response types, WebSocket, SSE broadcaster, middleware (CORS, RequestID, RequestTiming, TrustedHost, ViteDevProxy), Granian server lifecycle, dependency injection, auth (JWT, passwords, CSRF), structured logging, background tasks, feature flags, MCP server support, and test client utilities.","type":"feature"}
2
+ {"commits":["25a4f41c2ac0d3c3b5d0fbdee41389cdd7cd3f14","210e8ed5480c5bb44d52f5d920c9d2a499e88a70","410e1cc4728347bdc91f467e76c5184bb60cba29","90c6b34cead870c767da2c8afd6959703ee66165","67666fe90231520f3899b669b353e8de4e5f23b3"],"user_facing":false}
3
+ {"commits":["02950ba3bca6eeb9b103509f98652ba7e9f9f158","fdc0e66165602688acf3cf801548d900c09ec916","ebfe9e986feb417b5d8db066552ff9ae04f7261c","0d52d836819fe13be0b4625aa44f4651de529795","83f185703bad65538e6e95f9626f96ed88522c17","7189ea7175d99f73811c98a1e4e061c2803a58cd","fd414c84bf46ead64dd85a158926f2bbdd518140","99c00fa5cc673aa8f97f5cfdf4324ac0ba8fd08c","c03ee0b73f46c6ece07be487572fc0c769f49eb5","7aaab49dad72703e1c0f17440e195d1255974e5e","7e6c6d334aef4ff7b709a26d5039f19421a02e78","41a5739c93a5e90efd15d9bcdb2926b7c5eb3871","d92890315b6c132c0316067579f058cce02f2bf4","ce9379779ce6952b0f6f4a5d194ce5c0a2c2a35b","71149b28d392f70775c24c86a27c279193afbe15"],"user_facing":false}
4
+ {"commits":["9cc2c2742c87b30bc8d81d14914a61be02507dad"],"user_facing":false}
5
+ {"commits":["dcc817777e2cbc93a299531e95959b897aa1ffba"],"user_facing":false}
6
+ {"commits":["d076e817edabec0b3bb8687739a80411c0327cc4"],"user_facing":false}
@@ -0,0 +1,7 @@
1
+ ## 0.1.0
2
+
3
+ Initial release of fastware, a fast batteries-included ASGI framework.
4
+
5
+ ### Features
6
+
7
+ - **Initial release.** ASGI micro-framework: Router, Request/Response types, WebSocket, SSE broadcaster, middleware (CORS, RequestID, RequestTiming, TrustedHost, ViteDevProxy), Granian server lifecycle, dependency injection, auth (JWT, passwords, CSRF), structured logging, background tasks, feature flags, MCP server support, and test client utilities.
File without changes
@@ -0,0 +1,15 @@
1
+ {
2
+ "targets": [
3
+ "pypi"
4
+ ],
5
+ "private": false,
6
+ "pipelines": {
7
+ "pypi": {
8
+ "type": "pypi",
9
+ "local": false
10
+ }
11
+ },
12
+ "batch_limits": {
13
+ "exclusions": []
14
+ }
15
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ ".github/workflows/ci.yml": "6ac8f00458a1ffbf579b1a5b21dba8be4c4a308ee580c59e695700265ec871a4",
3
+ ".github/workflows/publish.yml": "ac0d10ef538bb8d1008b3caffd8fb5678dc8881d26d25969b1de1a84018bd814",
4
+ "CHANGELOG.md": "7a6ec46141007c18090a0ff325e2dd68cd51588c4e0b5af7b580365e5eaaca85",
5
+ ".gitignore": "990b3e35962995a9c47350bf4a858e7ef427db6d7e3c9787e9b476937c1a77b8",
6
+ ".rlsbl/changes/unreleased.jsonl": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
7
+ ".rlsbl/lint/python.toml": "9cfbcef2e010d5fad243437bf2fd8df54a1fae70ee0762f9d11da70fe207501c"
8
+ }
@@ -0,0 +1,25 @@
1
+ [forbidden-imports]
2
+ modules = [
3
+ "argparse",
4
+ "click",
5
+ "typer",
6
+ "flask",
7
+ "fastapi",
8
+ "django",
9
+ "uvicorn",
10
+ "granian",
11
+ "starlette",
12
+ "tornado",
13
+ "bottle",
14
+ ]
15
+
16
+ [stdout]
17
+ enabled = true
18
+ ignore = []
19
+
20
+ [entry-point]
21
+ enabled = true
22
+ ignore = []
23
+
24
+ [files]
25
+ exclude = []
@@ -0,0 +1,11 @@
1
+ {
2
+ "version": 1,
3
+ "files": {
4
+ ".github/workflows/ci.yml": "6ac8f00458a1ffbf579b1a5b21dba8be4c4a308ee580c59e695700265ec871a4",
5
+ ".github/workflows/publish.yml": "ac0d10ef538bb8d1008b3caffd8fb5678dc8881d26d25969b1de1a84018bd814",
6
+ "CHANGELOG.md": "7a6ec46141007c18090a0ff325e2dd68cd51588c4e0b5af7b580365e5eaaca85",
7
+ ".gitignore": "990b3e35962995a9c47350bf4a858e7ef427db6d7e3c9787e9b476937c1a77b8",
8
+ ".rlsbl/changes/unreleased.jsonl": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
9
+ ".rlsbl/lint/python.toml": "9cfbcef2e010d5fad243437bf2fd8df54a1fae70ee0762f9d11da70fe207501c"
10
+ }
11
+ }
@@ -0,0 +1,12 @@
1
+ # Version bump type: patch, minor, major, hotfix, or prerelease
2
+ bump = "minor"
3
+ # Short description of this release (required)
4
+ description = "Initial release of fastware, a fast batteries-included ASGI framework."
5
+ # Optional context explaining why these changes were made
6
+ context = ""
7
+ # Pre-release identifier: alpha, beta, rc, or stable
8
+ # preid = ""
9
+ # Set to true to generate a blog post for this release
10
+ # blog = false
11
+ include = ["pypi"]
12
+ exclude = []
@@ -0,0 +1 @@
1
+ 0.92.0
@@ -0,0 +1,11 @@
1
+ <!-- Generated by rlsbl from .rlsbl/changes/ — do not edit -->
2
+
3
+ # Changelog
4
+
5
+ ## 0.1.0
6
+
7
+ Initial release of fastware, a fast batteries-included ASGI framework.
8
+
9
+ ### Features
10
+
11
+ - **Initial release.** ASGI micro-framework: Router, Request/Response types, WebSocket, SSE broadcaster, middleware (CORS, RequestID, RequestTiming, TrustedHost, ViteDevProxy), Granian server lifecycle, dependency injection, auth (JWT, passwords, CSRF), structured logging, background tasks, feature flags, MCP server support, and test client utilities.
fastware-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 S. M. Mohsen Hashemi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,33 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastware
3
+ Version: 0.1.0
4
+ Summary: A fast, batteries-included ASGI framework. The FastAPI alternative.
5
+ License-File: LICENSE
6
+ Keywords: rlsbl
7
+ Requires-Python: >=3.11
8
+ Requires-Dist: granian>=2.7.4
9
+ Requires-Dist: msgspec>=0.21.1
10
+ Provides-Extra: all
11
+ Requires-Dist: bcrypt; extra == 'all'
12
+ Requires-Dist: httpx>=0.28; extra == 'all'
13
+ Requires-Dist: mcp; extra == 'all'
14
+ Requires-Dist: pydantic; extra == 'all'
15
+ Requires-Dist: pyjwt; extra == 'all'
16
+ Requires-Dist: structlog; extra == 'all'
17
+ Requires-Dist: watchfiles; extra == 'all'
18
+ Requires-Dist: websockets; extra == 'all'
19
+ Provides-Extra: auth
20
+ Requires-Dist: bcrypt; extra == 'auth'
21
+ Requires-Dist: pyjwt; extra == 'auth'
22
+ Provides-Extra: dev
23
+ Requires-Dist: httpx>=0.28; extra == 'dev'
24
+ Requires-Dist: watchfiles; extra == 'dev'
25
+ Requires-Dist: websockets; extra == 'dev'
26
+ Provides-Extra: logging
27
+ Requires-Dist: structlog; extra == 'logging'
28
+ Provides-Extra: mcp
29
+ Requires-Dist: mcp; extra == 'mcp'
30
+ Provides-Extra: pydantic
31
+ Requires-Dist: pydantic; extra == 'pydantic'
32
+ Provides-Extra: testing
33
+ Requires-Dist: httpx>=0.28; extra == 'testing'
@@ -0,0 +1,39 @@
1
+ [project]
2
+ name = "fastware"
3
+ version = "0.1.0"
4
+ description = "A fast, batteries-included ASGI framework. The FastAPI alternative."
5
+ requires-python = ">=3.11"
6
+ dependencies = [
7
+ "msgspec>=0.21.1",
8
+ "granian>=2.7.4",
9
+ ]
10
+ keywords = ["rlsbl"]
11
+
12
+ [project.optional-dependencies]
13
+ auth = ["pyjwt", "bcrypt"]
14
+ logging = ["structlog"]
15
+ dev = ["httpx>=0.28", "watchfiles", "websockets"]
16
+ testing = ["httpx>=0.28"]
17
+ mcp = ["mcp"]
18
+ pydantic = ["pydantic"]
19
+ all = [
20
+ "fastware[auth]",
21
+ "fastware[logging]",
22
+ "fastware[dev]",
23
+ "fastware[testing]",
24
+ "fastware[mcp]",
25
+ "fastware[pydantic]",
26
+ ]
27
+
28
+ [dependency-groups]
29
+ dev = ["pytest", "httpx>=0.28"]
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/fastware"]
37
+
38
+ [tool.pytest.ini_options]
39
+ testpaths = ["tests"]
@@ -0,0 +1,104 @@
1
+ """A fast, batteries-included ASGI framework. The FastAPI alternative."""
2
+
3
+ from __future__ import annotations
4
+
5
+ import importlib.metadata
6
+
7
+ # -- Tier 1: Core symbols (eager imports -- lightweight modules) -------------
8
+
9
+ from fastware.types import Scope, Receive, Send
10
+ from fastware.responses import (
11
+ set_cookie,
12
+ delete_cookie,
13
+ HTTPError,
14
+ JSONResponse,
15
+ TextResponse,
16
+ HTMLResponse,
17
+ BytesResponse,
18
+ StreamResponse,
19
+ FileResponse,
20
+ send_error,
21
+ )
22
+ from fastware.request import State, Request
23
+ from fastware.routing import Router, ParsedSegment
24
+ from fastware.websocket import WebSocket
25
+ from fastware.app import AppConfig, create_app
26
+ from fastware.di import DependencyResolver
27
+ from fastware.sse import Broadcaster, sse_route
28
+
29
+ __version__ = importlib.metadata.version("fastware")
30
+
31
+ # -- Tier 1: Server symbols (lazy -- granian is ~60ms to import) ------------
32
+
33
+ _SERVER_SYMBOLS = {
34
+ "check_already_running",
35
+ "ensure_port_available",
36
+ "read_port_file",
37
+ "serve_background",
38
+ "serve",
39
+ "stop",
40
+ "status",
41
+ "ServerStatus",
42
+ "PortInUseError",
43
+ "AlreadyRunningError",
44
+ }
45
+
46
+
47
+ def __getattr__(name: str) -> object:
48
+ if name in _SERVER_SYMBOLS:
49
+ from fastware import server
50
+ return getattr(server, name)
51
+ raise AttributeError(f"module 'fastware' has no attribute {name!r}")
52
+
53
+
54
+ # -- Tier 2+: Feature modules stay in sub-modules ---------------------------
55
+ # fastware.auth, fastware.middleware, fastware.logging, fastware.testing,
56
+ # fastware.features, fastware.audit, fastware.error_log, fastware.tasks,
57
+ # fastware.config, fastware.mcp, fastware.dev
58
+
59
+ __all__ = [
60
+ # types
61
+ "Scope",
62
+ "Receive",
63
+ "Send",
64
+ # responses
65
+ "set_cookie",
66
+ "delete_cookie",
67
+ "HTTPError",
68
+ "JSONResponse",
69
+ "TextResponse",
70
+ "HTMLResponse",
71
+ "BytesResponse",
72
+ "StreamResponse",
73
+ "FileResponse",
74
+ "send_error",
75
+ # request
76
+ "State",
77
+ "Request",
78
+ # routing
79
+ "Router",
80
+ "ParsedSegment",
81
+ # websocket
82
+ "WebSocket",
83
+ # app
84
+ "AppConfig",
85
+ "create_app",
86
+ # di
87
+ "DependencyResolver",
88
+ # sse
89
+ "Broadcaster",
90
+ "sse_route",
91
+ # server (lazy)
92
+ "check_already_running",
93
+ "ensure_port_available",
94
+ "read_port_file",
95
+ "serve_background",
96
+ "serve",
97
+ "stop",
98
+ "status",
99
+ "ServerStatus",
100
+ "PortInUseError",
101
+ "AlreadyRunningError",
102
+ # metadata
103
+ "__version__",
104
+ ]
@@ -0,0 +1,8 @@
1
+ """Enable `python -m fastware`."""
2
+
3
+ # Placeholder until CLI is implemented
4
+ def main() -> None:
5
+ print("fastware CLI not yet implemented")
6
+
7
+ if __name__ == "__main__":
8
+ main()