konklav-fastapi
Konklav route policies for FastAPI.
Declare an operation's requirements as a RoutePolicy on routes, routers
and include_router; install KonklavRoutes once with your started
RelyingClient from konklav-relying,
and every request is decided by the relying core with one call.
from fastapi import APIRouter
from konklav_fastapi import KonklavRoutes, RoutePolicy, TenantToken
router = APIRouter(dependencies=[RoutePolicy(tenant_actions={"project:read"})])
@router.get("/projects/{project}", dependencies=[RoutePolicy(scope_actions={"project": {"document:read"}})])
async def read_project(project: str, token: TenantToken) -> dict[str, str]:
return {"project": project, "subject": token.sub}
Startup validation refuses routes without a policy, policies that can't be
decided, and token dependencies the policy doesn't match. Each operation's
merged policy is published in OpenAPI as x-konklav-policy.
Versions
The package has the same version as the Konklav server it was released
with, and requires konklav-relying of that version. It is supported only
against a server of the same version.
Metadata
Release files for konklav-fastapi 1.5.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 |
|---|---|---|---|---|
| konklav_fastapi-1.5.0.tar.gz | 10.9 kB | With provenance | Details for konklav_fastapi-1.5.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| konklav_fastapi-1.5.0-py3-none-any.whl | Python 3 | none | any | Details for konklav_fastapi-1.5.0-py3-none-any.whl |
Total release size: 24.9 kB
Release files / konklav_fastapi-1.5.0.tar.gz
| Download URL | konklav_fastapi-1.5.0.tar.gz |
|---|---|
| Size | 10.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a7206f250abaa421e552f7822ad1f8e30dedca8b0b413b1267b87e43f75770a
|
|
BLAKE2b-256 checksum How to use checksums |
2c43b9c87e424e84ba4e67646b3330b97bf7313951e623e8e9a663e891873038
|
| 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 6, 2026.
Transparency logRelease files / konklav_fastapi-1.5.0-py3-none-any.whl
| Download URL | konklav_fastapi-1.5.0-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
71193f5d31b4c94ab47b422001c491e09cfc9d4448c902ef90fc989075afb0fc
|
|
BLAKE2b-256 checksum How to use checksums |
1ed600dbeba0996170c1b247859aef5b3427a65e18ef90ead1bef7e2cb244024
|
| 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 6, 2026.
Transparency logSecurity for konklav-fastapi 1.5.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 konklav_fastapi-1.5.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 6, 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.