A chaos engineering framework for Python Flask applications.
Project description
Flask integration
Installation
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 |
---|---|
RELIABILITY_PLATFORM_APPLICATION_NAME |
The service application's name |
RELIABILITY_PLATFORM_APPLICATION_ENV |
The service application's deployed environment |
RELIABILITY_PLATFORM_PROOFDOCK_API_TOKEN |
The API token to connect to Proofdock's Chaos API |
The configuration exemplified as code:
from flask import Flask, jsonify
from proofdock.rp.contrib.flask.middleware import FlaskMiddleware
app = Flask(__name__)
app.config['RELIABILITY_PLATFORM_APPLICATION_NAME'] = 'example-application-name'
app.config['RELIABILITY_PLATFORM_APPLICATION_ENV'] = 'example-environment'
app.config['RELIABILITY_PLATFORM_PROOFDOCK_API_TOKEN'] = 'eyJ0eXAi...05'
middleware = FlaskMiddleware(app)
# Your business logic here
@app.route("/")
def hello():
return "Hello World!"
if __name__ == "__main__":
app.run()
Start your Flask application and create an attack using HTTP request header or control panel. Read more about attacks here.
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
File details
Details for the file proofdock_reliability_platform_flask-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: proofdock_reliability_platform_flask-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce49dd41b50f1f83942f087b7fc046972949298a3b6514f8a9017de3b2339b02 |
|
MD5 | dbb6ee10546987af335dc5d27146991b |
|
BLAKE2b-256 | 436f1cd4de2ead8d115f3c2a7726402fd898f3442ac0eef757b36fb074672e88 |