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 hashes)
Built Distribution
Close
Hashes for fastapi_health-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba5566734b1eb085d1d6d1089762607e2cb2f5dad4c42638ab14b4b77294dd7e |
|
MD5 | 5750af6bc2fc1b65abdabbc7030a7621 |
|
BLAKE2b-256 | 4af84bc67c1979a0ab17fe8aeaa0a12733ef2a590e21e1a44b71ee587179c242 |