New:Microsoft Teams Notifications Are Now Available in Socket.Learn more
Get Started

starlette-healthcheck

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Malware was recently detected in this package.

Affected versions:

1.2.01.3.01.3.1

starlette-healthcheck

Structured ASGI request logging and remote log aggregation for FastAPI/Starlette.

pipPyPI
Version
1.3.1
Weekly downloads
13
-94.12%
Maintainers
1
Weekly downloads
 
Created

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-healthcheck

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-healthcheck
from starlette_healthcheck import configure_logging, HealthcheckMiddleware

Keywords

asgi

FAQs

Related posts