standard-fastapi
FastAPI integration for the standard
Python library. After publication, install it directly with
python -m pip install standard-fastapi or use the standard[fastapi] extra.
Define the application's settings model in core/settings.py:
from std.config import YamlSettings
class Settings(YamlSettings):
std_config_file = "settings.yaml"
service_name: str
In main.py, create the app and inject that settings instance once:
from fastapi import Depends, FastAPI
from app.core.settings import Settings
from std.fastapi import settings_dependency
def create_app() -> FastAPI:
settings = Settings() # Create once in the application composition root.
app = FastAPI()
app.state.settings = settings
settings_dep = settings_dependency(Settings)
@app.get("/health")
async def health(settings: Settings = Depends(settings_dep)) -> dict[str, str]:
return {"service": settings.service_name}
return app
Create Settings() once in main.py and assign the instance to
app.state.settings. The dependency returns that injected instance and never
constructs or reloads settings.
The integration includes APIConfig and FastAPISetup for app construction,
LifecycleManager for injected background services, AppTokenAuth and
TokenAuthMiddleware, health-check endpoints, request logging middleware, and
the Pydantic Settings dependency helper. Core service lifecycle types remain
available as std.service from standard.
The core library and this package are versioned independently. The std
command and core modules remain in the standard distribution. See the
API reference for public
signatures, behavior, and examples.
Metadata
Release files for standard-fastapi 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| standard_fastapi-0.2.3.tar.gz | 10.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| standard_fastapi-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.4 kB
Release files / standard_fastapi-0.2.3.tar.gz
| Download URL | standard_fastapi-0.2.3.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2713f26b4f5e02307f4a2bf14d5743b45368e75fbfdf42cbdb42345ba9c3afd8
|
|
BLAKE2b-256 checksum How to use checksums |
73ac2059cff827d58f5bb31793fe9520ffed7ab496b4748efc70f62c1cac0035
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency logRelease files / standard_fastapi-0.2.3-py3-none-any.whl
| Download URL | standard_fastapi-0.2.3-py3-none-any.whl |
|---|---|
| Size | 15.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72e23ec6d6ef5916c1f15f645716a9425da34e4a57b0ba6d3345f059a913497f
|
|
BLAKE2b-256 checksum How to use checksums |
9ca1dc6c632016ae95bf3736012f0515c7302b9a533cb2582a1859d4afdebabc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.
Transparency log