Skip to main content

A chaos engineering framework for Python Flask applications.

Project description

Flask integration

CI Python versions

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


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

File hashes

Hashes for proofdock_reliability_platform_flask-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce49dd41b50f1f83942f087b7fc046972949298a3b6514f8a9017de3b2339b02
MD5 dbb6ee10546987af335dc5d27146991b
BLAKE2b-256 436f1cd4de2ead8d115f3c2a7726402fd898f3442ac0eef757b36fb074672e88

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page