Skip to main content

A chaos engineering framework for Python Flask applications.

Project description

Flask integration

Python versions

Installation

This package requires Python 3.5+

$ pip install -U proofdock-reliability-platform-flask

Usage

The reliability platform client 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 Reliability Platform 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 inject faults using the Reliability Platform. More.

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

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file proofdock_reliability_platform_flask-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: proofdock_reliability_platform_flask-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.8 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

Hashes for proofdock_reliability_platform_flask-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1462417df731bc2512986b073f6af82af58e7395c4d56f4ec80c56aacbf2b7e9
MD5 dfbb68d60bdd9704acd761a1ef8abffb
BLAKE2b-256 ec467895edcebe24300f28b33fc4927513f0746817db33ef908833255b0eca10

See more details on using hashes here.

Supported by

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