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.2

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.2
File Size Uploaded
starlette_healthchecks-1.3.2.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for starlette-healthchecks 1.3.2
File Interpreter ABI Platform
starlette_healthchecks-1.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / starlette_healthchecks-1.3.2.tar.gz

Download URL starlette_healthchecks-1.3.2.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2f45f5be0b47d7c0dfe16c57a533072aab334b34677c6ed1b7715347a71ca717
BLAKE2b-256 checksum
How to use checksums
6146bc3b174acc658af677fcfd29be362807678646039cc6dec54984cf38933a
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.2-py3-none-any.whl

Download URL starlette_healthchecks-1.3.2-py3-none-any.whl
Size 5.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2588d3e1db8f1a8444b30cc44851c3a3ba2b16d657624da3eb5620bac0c935cf
BLAKE2b-256 checksum
How to use checksums
2c03c06f48a79d1cf0800d9aae4f74c6d037694066f1244ab256078b5c4853b9
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

This release

1.3.2 This release

2 release files

1.3.1

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