Chaos Middleware Flask integration
Install
This package requires Python 3.5+
$ pip install -U proofdock-chaos-middleware-flask
Usage
The chaos middleware for Flask takes the following input variables:
| Variable | Description |
|---|---|
CHAOS_MIDDLEWARE_APPLICATION_NAME |
The service application's name |
CHAOS_MIDDLEWARE_APPLICATION_ENV |
The service application's deployed environment |
CHAOS_MIDDLEWARE_PROOFDOCK_API_TOKEN |
The API token to connect to Proofdock's Chaos API |
The configuration exemplified as code:
from flask import Flask, jsonify
from pdchaos.middleware.contrib.flask.flask_middleware import FlaskMiddleware
app = Flask(__name__)
app.config['CHAOS_MIDDLEWARE_APPLICATION_NAME'] = 'example-application-name'
app.config['CHAOS_MIDDLEWARE_APPLICATION_ENV'] = 'example-environment'
app.config['CHAOS_MIDDLEWARE_PROOFDOCK_API_TOKEN'] = 'eyJ0eXAi...05'
middleware = FlaskMiddleware(app)
# Your business logic here
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
References
Metadata
Release files for proofdock-chaos-middleware-flask 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proofdock_chaos_middleware_flask-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for proofdock_chaos_middleware_flask-0.1.3-py3-none-any.whl |
Release files / proofdock_chaos_middleware_flask-0.1.3-py3-none-any.whl
| Download URL | proofdock_chaos_middleware_flask-0.1.3-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
935a06583c30ec6bbc73a32614598803109047665cac0e34022b3571be7c5f5d
|
|
BLAKE2b-256 checksum How to use checksums |
f0f077462ed687c7499a500e5451d48a45e295bfe761345390eea47c8d580d51
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
|
Security for proofdock-chaos-middleware-flask 0.1.3
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.