Health checks and monitoring toolkit for Django applications.
Project description
django-healthkit
Lightweight and extensible health checks for Django applications.
django-healthkit helps you expose health check endpoints for your
Django services so they can be monitored by load balancers, container
platforms, and monitoring systems.
Features
- Lightweight and dependency-free (Django only)
- Class-based health endpoint
- Database health check
- Cache health check
- Configurable via Django settings
- Extensible architecture
- Suitable for Docker and Kubernetes
Requirements
- Python 3.10+
- Django 5.2+
Installation
pip install django-healthkit
Quick Start
1. Add the application
INSTALLED_APPS = [
...
"django_healthkit",
...
]
2. Configure HealthKit
HEALTHKIT = {
"CHECKS": [
"django_healthkit.checks.database.DatabaseCheck",
"django_healthkit.checks.cache.CacheCheck",
],
}
3. Register the endpoint
from django.urls import path
from django_healthkit.views import HealthView
urlpatterns = [
path("health/", HealthView.as_view(), name="health"),
]
4. Visit
GET /health/
Example Response
{
"healthy": true,
"checks": [
{
"name": "database",
"healthy": true,
"message": "Database is healthy.",
"latency": 0.49
},
{
"name": "cache",
"healthy": true,
"message": "Cache is healthy.",
"latency": 0.57
}
]
}
Why django-healthkit?
Modern applications require reliable health endpoints for orchestration and monitoring.
django-healthkit provides a simple, extensible foundation for exposing
the health of your Django application without unnecessary dependencies.
Roadmap
- Disk health check
- Memory health check
- CPU health check
- Custom check registration
- Async health checks
- Prometheus exporter
- OpenTelemetry integration
Contributing
Contributions, issues, and feature requests are welcome.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file django_healthkit-0.1.1.tar.gz.
File metadata
- Download URL: django_healthkit-0.1.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83a9d001fe82b1a6d2ccc6e0e0c519bad7ad71157e6cbe92a2557a9c92e47347
|
|
| MD5 |
d444b7460126fe9cab733aa3524effc8
|
|
| BLAKE2b-256 |
7b55982843dd69e6e85814f61178b4b68988548d7876f4f76f2a30ccd1259ab8
|
File details
Details for the file django_healthkit-0.1.1-py3-none-any.whl.
File metadata
- Download URL: django_healthkit-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75421bd1b6577fd3e69b1683c3eb9b2be5999e8b79dca7085536c449ef82efb8
|
|
| MD5 |
f326a553a7338e380698e989a4f94ec3
|
|
| BLAKE2b-256 |
8cd957f2ac49b31b1eca1bb7b21846791106efa57831d1c02ed178fab24d7816
|