Starlette Healthcheck — Python
Structured ASGI request logging middleware and log aggregation for Starlette/FastAPI applications.
Features
- ASGI middleware — logs each request method, path, status code, and duration
- Structured logging — configurable console output with standard datetime formatting
- Remote log aggregation — sends log entries to a centralised collector service (configurable endpoint and API key)
- Thread-safe startup registration — non-blocking handler registration on initialisation
Installation
pip install starlette-healthchecks
Quick Start
from starlette_healthcheck import configure_logging, HealthcheckMiddleware
from fastapi import FastAPI
configure_logging(level="INFO")
app = FastAPI()
app.add_middleware(HealthcheckMiddleware)
Consuming in Your App
pip install starlette-healthchecks
from starlette_healthcheck import configure_logging, HealthcheckMiddleware
Release files for starlette-healthchecks 1.3.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 | |
|---|---|---|---|
| starlette_healthchecks-1.3.1.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| starlette_healthchecks-1.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.0 kB
Release files / starlette_healthchecks-1.3.1.tar.gz
| Download URL | starlette_healthchecks-1.3.1.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fc4308c1a8f16126c6dc3d413c5f8277875241f5c2761de81d629121dd2526ac
|
|
BLAKE2b-256 checksum How to use checksums |
6cd84f7e777f01fbb0748c7b47015b3d66075ccaa2138e64290b50fb259a12be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|
Release files / starlette_healthchecks-1.3.1-py3-none-any.whl
| Download URL | starlette_healthchecks-1.3.1-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
816bb4c272211efdbe178994b4d60a4fd596e0c7d2b744b8857a08902340198c
|
|
BLAKE2b-256 checksum How to use checksums |
dbc69cada257cb5bd27189230d87e92b7be6f41363e15ccf40ce09906f846af3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.8
|