FastAPI Extension Package
A well-tailored utility set for FastAPI.
Requirements
- Python 3.8+
Installation
To install FastAPI Extension Package, use pip:
pip install fastapi-ext-pkg
Shared middleware configuration
configure_middlewares registers middleware on an existing FastAPI application
before startup. Configure service values centrally while preserving routers and
lifespan:
from fastapi_extras.middlewares import configure_middlewares
configure_middlewares(
app,
root_path=settings.ROOT_PATH,
apm_config=settings.ELASTIC_APM,
cors={"allow_origins": settings.ALLOW_ORIGINS},
)
The default registration order is path removal, trace-header removal, APM,
extra_middlewares, then CORS. Incoming requests traverse it in reverse. Use
order to preserve a service-specific order; include every configured name
exactly once. MiddlewareSpec defines custom middleware and named overrides
for replacement or disabling (enabled=False).
Use root_path=None, remove_cloud_trace_headers=False, apm_enabled=False,
or cors=None to omit middleware. Pass either apm_config or apm_client.
APM uses the upstream elasticapm.contrib.starlette.ElasticAPM by default and
requires the optional [apm] dependency. This branch contains no custom APM
implementation. To register another implementation supplied by the caller, pass
apm_middleware_class; apm_options supplies its constructor options.
Metadata
Release files for fastapi-ext-pkg 0.7.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 |
|---|---|---|---|---|
| fastapi_ext_pkg-0.7.0.tar.gz | 13.1 kB | With provenance | Details for fastapi_ext_pkg-0.7.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fastapi_ext_pkg-0.7.0-py3-none-any.whl | Python 3 | none | any | Details for fastapi_ext_pkg-0.7.0-py3-none-any.whl |
Total release size: 31.5 kB
Release files / fastapi_ext_pkg-0.7.0.tar.gz
| Download URL | fastapi_ext_pkg-0.7.0.tar.gz |
|---|---|
| Size | 13.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
370549cc290e338bcd6e559e4cbca2b4d197753e092b7fa1e99279386d87dc24
|
|
BLAKE2b-256 checksum How to use checksums |
cf75065c4fd2b256d89cbf72293589b7f4b7a7b233e306431fd449c94325973d
|
| 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 Oct 27, 2026.
Transparency logRelease files / fastapi_ext_pkg-0.7.0-py3-none-any.whl
| Download URL | fastapi_ext_pkg-0.7.0-py3-none-any.whl |
|---|---|
| Size | 18.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d9b84fb8701e897f716c10e304f96abd61dab3731016e2cd9a8fdfb10e98853
|
|
BLAKE2b-256 checksum How to use checksums |
fdba2b9073bb8f658058fdeba740d567ef2b85ff08c3ab54263885c757b701f1
|
| 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 Oct 27, 2026.
Transparency logSecurity for fastapi-ext-pkg 0.7.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 fastapi_ext_pkg-0.7.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 Oct 27, 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.