Flask AutoInject
Flask integration to provide separate contexts for each request regardless of the underlying WSGI handler.
As of version 1.1.0, you MUST use the init_app() function
to properly use autoinject with Flask contexts. Previously,
the informant was registered automatically. Calling init_app()
now (as of 2.0.0) uses the new contextvars integration in autoinject
by wrapping the call to wsgi_app() in an autoinject.with_contextvars()
decorator. This ensures that injected functions are cleaned up when the call
to wsgi_app() ends and prevents any ordering problems in terms of the
teardown functions.
Note that this module does not provide management of autoinjected variables outside of the context of a call to wsgi_app() (essentially from app config push to teardown). Any other management you will need to provide yourself.
import flask
import flask_autoinject
app = flask.Flask(__name__)
flask_autoinject.init_app(app)
Metadata
Release files for flask-autoinject 2.0.2
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 |
|---|---|---|---|---|
| flask_autoinject-2.0.2.tar.gz | 2.9 kB | Without provenance | Details for flask_autoinject-2.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flask_autoinject-2.0.2-py3-none-any.whl | Python 3 | none | any | Details for flask_autoinject-2.0.2-py3-none-any.whl |
Total release size: 6.3 kB
Release files / flask_autoinject-2.0.2.tar.gz
| Download URL | flask_autoinject-2.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04ed82f40de3d73d7f4f18ad90f9e3ad4dff036d8f642c4ab05d74dbbd210b9b
|
|
BLAKE2b-256 checksum How to use checksums |
beb92c5d03cebb200f721b93bb0c5e31ed647782669f4b0f29a3b3bbcca82b48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Release files / flask_autoinject-2.0.2-py3-none-any.whl
| Download URL | flask_autoinject-2.0.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e9c24fcc2c38c78fd7d005738ab9ddced5f83240ca95a49b3a89f3ecfaf9c829
|
|
BLAKE2b-256 checksum How to use checksums |
b4b8a8e763f7e95a1ecf9124621db59c77c619eae85f1171a1d4722b5ccd8243
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.6
|
Security for flask-autoinject 2.0.2
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.