FastAPI health check extension for Kubernetes liveness, readiness, and startup probes
Installation
pip install gadfasthealth
Usage
def check_redis() -> bool:
return False
async def check_db() -> bool:
return True
app = fastapi.FastAPI()
health = Health(
("/-/liveness", check_db),
("/-/readiness", check_db, check_redis),
("/-/startup", check_db),
("/-/custom"),
)
app.include_router(health.router)
Metadata
Release files for gadfasthealth 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gadfasthealth-0.0.1.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gadfasthealth-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.4 kB
Release files / gadfasthealth-0.0.1.tar.gz
| Download URL | gadfasthealth-0.0.1.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4691f8443904d1ee1561a127c39a11f8145524775564fb3bd1543ffd8dc26956
|
|
BLAKE2b-256 checksum How to use checksums |
1970f9c960f4792ec4f533f7629dfaaadfa6d99a969da4179fce5f91b5afd7fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Release files / gadfasthealth-0.0.1-py3-none-any.whl
| Download URL | gadfasthealth-0.0.1-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ed630921b53997b3460c9c8757d4129690b0f5dea76563d0ec43a6b07f62173d
|
|
BLAKE2b-256 checksum How to use checksums |
3d53f48386f02a19b89b370cedc7f531206180efa5c512e763db1fefc91575e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|