Skip to main content

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)

Source distribution for starlette-healthchecks 1.3.1
File Size Uploaded
starlette_healthchecks-1.3.1.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for starlette-healthchecks 1.3.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

1.3.2

2 release files

This release

1.3.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page