Registry / devops / fastapi-healthchecks

fastapi-healthchecks

JSON →
library1.1.0pypypiunverified

FastAPI Healthchecks provides a simple, configurable healthcheck endpoint for FastAPI applications. Version 1.1.0 supports customizable health checks, async checks, and integration with monitoring tools. Released as needed, currently active.

pip install fastapi-healthchecks
INSTALL
IMPORT
SIG · FASTAPI-HEALTHCHEC
F
fastapi-healthchecks
devopspythonv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

HealthCheck
from fastapi_healthchecks import HealthCheck
from fastapi_healthchecks import HealthCheck

Registers a basic healthcheck endpoint at /health.

from fastapi import FastAPI from fastapi_healthchecks import HealthCheck app = FastAPI() def db_health() -> dict: return {"database": "ok"} @app.on_event("startup") async def startup(): hc = HealthCheck(app, checks=[db_health]) hc.register()
Debug
Known issues
breakingVersion 1.0.0 removed the deprecated `healthcheck` attribute in favor of `checks` parameter.
fix
Replace `healthcheck=your_check` with `checks=[your_check]`.
affects: >=1.0.0
gotchaHealthCheck.register() must be called after the app is ready (e.g., inside a startup event) or the endpoint may not be available.
fix
Call register() inside @app.on_event('startup') or during app initialization.
affects: all
deprecatedThe `healthcheck` parameter in HealthCheck is deprecated since 0.3.0 and removed in 1.0.0.
fix
Migrate to `checks` parameter as a list of callables.
affects: <1.0.0
Upgrade
Version history
1.1.0latest on PyPI · released Feb 1, 2024
Audit
Dependencies
fastapirequiredrequired for app integration
Agent activity
2 hits · last 30 days
node
2
Resources

No resource links recorded.

fastapi-healthchecks — pip install fastapi-healthchecks · libregistry