Heath check on FastAPI applications.
Project description
FastAPI Health 🚑️
The goal of this package is to help you to implement the Health Check API pattern.
Installation
pip install fastapi-health
Usage
Using this package, you can create the health check endpoint dynamically using different conditions. Each condition is a callable and you can even have dependencies inside of it.
from fastapi import FastAPI, Depends
from fastapi_health import health
def get_session():
return True
def is_database_online(session: bool = Depends(get_session)):
return session
app = FastAPI()
app.add_api_route("/health", health([is_database_online]))
License
This project is licensed under the terms of the MIT license.
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
fastapi-health-0.2.1.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file fastapi-health-0.2.1.tar.gz
.
File metadata
- Download URL: fastapi-health-0.2.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4abab9d6e1d498d1becfa7ee8ae213fdfa01cbe1e0c34dc65d1d0aa74ef3dd03 |
|
MD5 | 0940c448dfa37759b6c0a8db26ac2a12 |
|
BLAKE2b-256 | 9737c63d8fa8d28ac56b75d5acdda7b0488c31c11538103809742abcb65e983a |
File details
Details for the file fastapi_health-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: fastapi_health-0.2.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.8.5 Linux/5.8.0-40-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5566734b1eb085d1d6d1089762607e2cb2f5dad4c42638ab14b4b77294dd7e |
|
MD5 | 5750af6bc2fc1b65abdabbc7030a7621 |
|
BLAKE2b-256 | 4af84bc67c1979a0ab17fe8aeaa0a12733ef2a590e21e1a44b71ee587179c242 |