Feature Standards Python authentication
Session authentication for FastAPI with a reusable application factory and authentication dependency. The implementation follows the same behavioral contracts as the project's Go, Java, Rust, and browser clients.
from typing import Annotated
from fastapi import Depends
from feature_auth import create_app, current_user
app = create_app()
@app.get("/private")
def private(user: Annotated[dict, Depends(current_user)]):
return {"user": user}
Python 3.12 or later is required. Configuration is read when the application lifespan starts. In-memory mode supports one configured user and process-local sessions. PostgreSQL mode adds shared persistent sessions; the optional account lifecycle profile adds registration, email verification, and password reset.
For a loopback-only demo, explicitly set AUTH_DEMO=true, AUTH_COOKIE_SECURE=false, and AUTH_ALLOWED_ORIGIN=http://127.0.0.1:5173. Run Uvicorn with --no-proxy-headers. Demo credentials are demo@example.com / correct-horse-battery-staple; they are not production credentials.
Database migrations and seeding are explicit repository tools. Installing or starting this package does not create tables or users. Production HTTPS, proxy policy, secrets, mail delivery, and operational controls require deployment-specific configuration.
See the source and integration guide, contracts, and security policy. Contract tests are not an independent security audit. MIT licensed.
Metadata
Release files for feature-standards-python-auth 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| feature_standards_python_auth-0.2.0.tar.gz | 10.8 kB | With provenance | Details for feature_standards_python_auth-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| feature_standards_python_auth-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for feature_standards_python_auth-0.2.0-py3-none-any.whl |
Total release size: 24.8 kB
Release files / feature_standards_python_auth-0.2.0.tar.gz
| Download URL | feature_standards_python_auth-0.2.0.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba03ec700bff340a0f44f796246167a05139a651c9ad16c1b3b3a1c7832925e2
|
|
BLAKE2b-256 checksum How to use checksums |
ff5e4dab31746b49318137a12d292269e345231712b2c462519428aaf6d68113
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 5, 2026.
Transparency logRelease files / feature_standards_python_auth-0.2.0-py3-none-any.whl
| Download URL | feature_standards_python_auth-0.2.0-py3-none-any.whl |
|---|---|
| Size | 14.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
230d62022cf469909a66138ac1a17d8cdd2a60cab5de484f54228e407d473df4
|
|
BLAKE2b-256 checksum How to use checksums |
982c9ad37cf6e64cd3c7fe63855d3aed0cdd67bb9a160ba4daba3833817ec038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 5, 2026.
Transparency logSecurity for feature-standards-python-auth 0.2.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for feature_standards_python_auth-0.2.0.tar.gz
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 Nov 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.