Skip to main content

Flask-Meter adds a healthcheck endpoint for Flask apps.

Project description

Healthchecks for Flask Apps

https://img.shields.io/pypi/v/Flask-Meter.svg https://tc.spin-flip.com/app/rest/builds/buildType:id:FlaskMeter_TestPython310/statusIcon.svg Documentation Status https://codecov.io/gh/Kartstig/flask-meter/branch/master/graph/badge.svg?token=NsmixA2iCH PyPI - Downloads

Flask-Meter is an add-on to the Flask web framework. Flask-Meter adds a monitoring endpoint for consuming application metrics. It can be really simple to set up. Flask-Meter modifies the Flask application to provide an enpoint at /_health where you will get a JSON response of the system’s uptime, current git revision.

You can also add in extra checks by passing in a list of checks to the constructor.

Installing

Install and update using pip:

pip install -U Flask-Meter

Flask Configuration

from Flask import Flask
from flask_meter import FlaskMeter

app = Flask(__name__)

FlaskMeter(app)

Or if you can use the init_app function:

from Flask import Flask
from flask_meter import FlaskMeter

app = Flask(__name__)

flask_meter = FlaskMeter()
flask_meter.init_app(app)

Features

  • Current Git Commit

  • Current Version

  • Accepts custom functions

Configuration

Config Key

Description

Type

Default

FLASK_METER_ENABLE

Enable/Disable Flask-Meter

bool

True

FLASK_METER_GIT

Enable/Disable Git Stats

bool

True

FLASK_METER_VERSION

Enable/Disable Version Stats

bool

True

Sponsorship

Put your logo here! Become a sponsor and support this project!

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-Meter-1.1.2.tar.gz (18.0 kB view hashes)

Uploaded Source

Built Distribution

Flask_Meter-1.1.2-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

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