standard-fastapi 0.2.3__tar.gz → 0.2.4__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.
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/PKG-INFO +15 -10
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/README.md +13 -8
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/pyproject.toml +1 -1
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/.gitignore +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/LICENSE +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/__init__.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/api/__init__.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/api/config.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/api/lifecycle.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/api/service.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/api/setup.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/auth/__init__.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/auth/config.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/auth/middleware.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/dependencies.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/health/__init__.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/health/endpoint.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/logging/__init__.py +0 -0
- {standard_fastapi-0.2.3 → standard_fastapi-0.2.4}/src/std/fastapi/logging/middleware.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: standard-fastapi
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: FastAPI integration for the Standard Python library
|
|
5
5
|
Project-URL: Documentation, https://appunni-m.github.io/python-standard/api/
|
|
6
6
|
Project-URL: Repository, https://github.com/appunni-m/python-standard
|
|
@@ -20,14 +20,15 @@ Classifier: Programming Language :: Python :: 3.14
|
|
|
20
20
|
Classifier: Typing :: Typed
|
|
21
21
|
Requires-Python: >=3.11
|
|
22
22
|
Requires-Dist: fastapi<1,>=0.115
|
|
23
|
-
Requires-Dist: standard==0.2.
|
|
23
|
+
Requires-Dist: standard==0.2.4
|
|
24
24
|
Description-Content-Type: text/markdown
|
|
25
25
|
|
|
26
26
|
# standard-fastapi
|
|
27
27
|
|
|
28
28
|
FastAPI integration for the [`standard`](https://pypi.org/project/standard/)
|
|
29
|
-
Python library.
|
|
30
|
-
`python -m pip install standard-fastapi` or use the
|
|
29
|
+
Python library. All six distributions share one release version. Install it
|
|
30
|
+
directly with `python -m pip install standard-fastapi` or use the
|
|
31
|
+
`standard[fastapi]` extra.
|
|
31
32
|
|
|
32
33
|
Define the application's settings model in `core/settings.py`:
|
|
33
34
|
|
|
@@ -43,7 +44,9 @@ class Settings(YamlSettings):
|
|
|
43
44
|
In `main.py`, create the app and inject that settings instance once:
|
|
44
45
|
|
|
45
46
|
```python
|
|
46
|
-
from
|
|
47
|
+
from typing import Annotated
|
|
48
|
+
|
|
49
|
+
from fastapi import FastAPI
|
|
47
50
|
from app.core.settings import Settings
|
|
48
51
|
from std.fastapi import settings_dependency
|
|
49
52
|
|
|
@@ -55,7 +58,7 @@ def create_app() -> FastAPI:
|
|
|
55
58
|
settings_dep = settings_dependency(Settings)
|
|
56
59
|
|
|
57
60
|
@app.get("/health")
|
|
58
|
-
async def health(settings: Settings
|
|
61
|
+
async def health(settings: Annotated[Settings, settings_dep]) -> dict[str, str]:
|
|
59
62
|
return {"service": settings.service_name}
|
|
60
63
|
|
|
61
64
|
return app
|
|
@@ -71,7 +74,9 @@ The integration includes `APIConfig` and `FastAPISetup` for app construction,
|
|
|
71
74
|
the Pydantic Settings dependency helper. Core service lifecycle types remain
|
|
72
75
|
available as `std.service` from `standard`.
|
|
73
76
|
|
|
74
|
-
The core
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
The core and all five integration distributions share one release version,
|
|
78
|
+
derived from the same `vX.Y.Z` tag. The `std` command and core modules remain
|
|
79
|
+
in the `standard` distribution. See the
|
|
80
|
+
[API reference](https://appunni-m.github.io/python-standard/api/) and the
|
|
81
|
+
[independent consumer sample](https://github.com/appunni-m/python-standard/tree/main/sample-projects/standard-fastapi-consumer)
|
|
82
|
+
for public signatures, behavior, and a complete application example.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# standard-fastapi
|
|
2
2
|
|
|
3
3
|
FastAPI integration for the [`standard`](https://pypi.org/project/standard/)
|
|
4
|
-
Python library.
|
|
5
|
-
`python -m pip install standard-fastapi` or use the
|
|
4
|
+
Python library. All six distributions share one release version. Install it
|
|
5
|
+
directly with `python -m pip install standard-fastapi` or use the
|
|
6
|
+
`standard[fastapi]` extra.
|
|
6
7
|
|
|
7
8
|
Define the application's settings model in `core/settings.py`:
|
|
8
9
|
|
|
@@ -18,7 +19,9 @@ class Settings(YamlSettings):
|
|
|
18
19
|
In `main.py`, create the app and inject that settings instance once:
|
|
19
20
|
|
|
20
21
|
```python
|
|
21
|
-
from
|
|
22
|
+
from typing import Annotated
|
|
23
|
+
|
|
24
|
+
from fastapi import FastAPI
|
|
22
25
|
from app.core.settings import Settings
|
|
23
26
|
from std.fastapi import settings_dependency
|
|
24
27
|
|
|
@@ -30,7 +33,7 @@ def create_app() -> FastAPI:
|
|
|
30
33
|
settings_dep = settings_dependency(Settings)
|
|
31
34
|
|
|
32
35
|
@app.get("/health")
|
|
33
|
-
async def health(settings: Settings
|
|
36
|
+
async def health(settings: Annotated[Settings, settings_dep]) -> dict[str, str]:
|
|
34
37
|
return {"service": settings.service_name}
|
|
35
38
|
|
|
36
39
|
return app
|
|
@@ -46,7 +49,9 @@ The integration includes `APIConfig` and `FastAPISetup` for app construction,
|
|
|
46
49
|
the Pydantic Settings dependency helper. Core service lifecycle types remain
|
|
47
50
|
available as `std.service` from `standard`.
|
|
48
51
|
|
|
49
|
-
The core
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
The core and all five integration distributions share one release version,
|
|
53
|
+
derived from the same `vX.Y.Z` tag. The `std` command and core modules remain
|
|
54
|
+
in the `standard` distribution. See the
|
|
55
|
+
[API reference](https://appunni-m.github.io/python-standard/api/) and the
|
|
56
|
+
[independent consumer sample](https://github.com/appunni-m/python-standard/tree/main/sample-projects/standard-fastapi-consumer)
|
|
57
|
+
for public signatures, behavior, and a complete application example.
|
|
@@ -24,7 +24,7 @@ classifiers = [
|
|
|
24
24
|
"Programming Language :: Python :: 3.14",
|
|
25
25
|
"Typing :: Typed",
|
|
26
26
|
]
|
|
27
|
-
dependencies = ["standard==0.2.
|
|
27
|
+
dependencies = ["standard==0.2.4", "fastapi>=0.115,<1"]
|
|
28
28
|
urls = { Documentation = "https://appunni-m.github.io/python-standard/api/", Repository = "https://github.com/appunni-m/python-standard" }
|
|
29
29
|
|
|
30
30
|
[tool.hatch.build.targets.wheel]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|