Healthchecks for upstream dependencies of a Flask app
Project description
flask-keepincheck
Flask extension that implements healthchecks for application's upstream dependencies
Usage
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_keepincheck import HealthCheck
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = ''
db = SQLAlchemy(app)
healthcheck = HealthCheck()
healthcheck.add_db_check(app=app, db=db)
class User(db.Model):
id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True, nullable=False)
email = db.Column(db.String(120), unique=True, nullable=False)
def __repr__(self):
return '<User %r>' % self.username
@app.route('/')
def hello_world():
return 'Hello, World!'
After this your db's healthcheck can be found at /dbhealth
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 Distribution
Flask-Keepincheck-0.1.tar.gz
(2.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Flask-Keepincheck-0.1.tar.gz.
File metadata
- Download URL: Flask-Keepincheck-0.1.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9887b5cb4adc2e291710912475dd9aef254f6cce628fc1a043c6d1c369a48f4a
|
|
| MD5 |
904460908ad0a666e08c0172f69844ba
|
|
| BLAKE2b-256 |
477c4cc1053c26389e87066f225fb173ee6fbb910b67dc12812562fea8d1c3af
|
File details
Details for the file Flask_Keepincheck-0.1-py3-none-any.whl.
File metadata
- Download URL: Flask_Keepincheck-0.1-py3-none-any.whl
- Upload date:
- Size: 3.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
427148ee574667e6854003c000814f170e448d7f2d379149c2a43e0efa96a4bf
|
|
| MD5 |
da9fbab815b9243faad2c3c18bdefdfd
|
|
| BLAKE2b-256 |
d56a4ab381faea05421fb7ebecb30e8719d2cc738ebdd9bfe203494666415886
|