A chaos engineering framework for Python Flask applications.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for proofdock_chaos_middleware_flask-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bec52177f018395fe0305f5ab57253f6a84b8a1245c6710bf53f8a171f7afbad |
|
MD5 | 4a57f9e89cefd0143dfbdd9f698d929b |
|
BLAKE2b-256 | 6ff31b100c517e350db5fb4bfb292b98c985115cb2fa65a520d3558dfc63cf5d |