An open API service indexing awesome lists of open source software.

https://github.com/alexdemure/gadfasthealth

FastAPI health check extension for Kubernetes liveness, readiness, and startup probes
https://github.com/alexdemure/gadfasthealth

fastapi-health

Last synced: 5 days ago
JSON representation

FastAPI health check extension for Kubernetes liveness, readiness, and startup probes

Awesome Lists containing this project

README

        



logo


FastAPI health check extension for Kubernetes liveness, readiness, and startup probes

---

### Installation

```
pip install gadfasthealth
```

### Usage

```python
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)
```