Python Actuator
Small, typed health checks for Python ASGI applications, inspired by the Spring Boot Actuator health API.
Installation
pip install python-actuator
Quick start
Create a health indicator for each component you want to monitor:
from python_actuator.indicators import HealthEndpoint
from python_actuator.models import HealthResult, HealthStatus
class DatabaseHealth:
def health(self) -> HealthResult:
return HealthResult(status=HealthStatus.UP)
health_endpoint = HealthEndpoint(
indicators={"database": DatabaseHealth()},
)
app = health_endpoint.asgi_app()
The ASGI application exposes:
GET /actuator/healthfor the overall application status;GET /actuator/health/{component}for one component;GET /actuator/health/{component}/{instance}for a component instance;HEADrequests for the same routes.
Healthy responses use HTTP 200. DOWN and OUT_OF_SERVICE responses use
HTTP 503.
Health results
Health results can include additional details:
HealthResult(
status=HealthStatus.UP,
details={"message": "Database connection is ready"},
)
The response follows the Spring Boot Actuator shape:
{
"status": "UP",
"details": {
"message": "Database connection is ready"
}
}
Development
The project uses uv, pytest, Ruff, mypy, and ty:
make test
make check
License
MIT
Metadata
Release files for python-actuator 0.1.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 | |
|---|---|---|---|
| python_actuator-0.1.1.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| python_actuator-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / python_actuator-0.1.1.tar.gz
| Download URL | python_actuator-0.1.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4947aa2d8e30ade5c06ade9307bf049782bd1f5bedf50a7a8f19a9fcca1c0991
|
|
BLAKE2b-256 checksum How to use checksums |
d0bfd162bb5cdbd13cf1230a302f66baaa9a4dea61e4e7c86fc044e71279dfd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / python_actuator-0.1.1-py3-none-any.whl
| Download URL | python_actuator-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
83db8c7ef822357be6976b92b72a5d39f3d207c2bb220be18e005d6f43cd88e1
|
|
BLAKE2b-256 checksum How to use checksums |
1eabea5bfd7ef55fea75450f98e646f9d19f5a97ef743b2ed4328b4b3c8d1265
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|