Registry / web-framework / django-health-check

django-health-check

JSON →
library4.5.1pypypi✓ verified 26d ago

Django HealthCheck is a plug-and-play Django application that provides a /healthcheck/ endpoint to monitor the health of your Django app and its connected services like databases, caches, storage, Celery, and more. It returns HTTP 200 for healthy status and HTTP 500 if issues are detected. The current version is 4.2.2, and it maintains a regular release cadence with frequent updates and bug fixes.

pip install django-health-check
INSTALL
IMPORT
SIG · DJANGO-HEALTH-CHEC
D
django-health-check
web-frameworkpythonv4.5.1
Install
4.7s avg
Import
Disk
85MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.5.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 97.9MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 4.7s · import 0.000s · 98MB
85MB installed
● package 85MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

health_check
from health_check import health_check
import health_check

To quickly integrate Django HealthCheck, add the 'health_check' core app and any desired `health_check.contrib.*` plugins to your `INSTALLED_APPS`. Then, include the health check URLs in your project's `urls.py`. Remember to install extra dependencies for specific checks (e.g., `psutil` for disk/memory checks).

# settings.py INSTALLED_APPS = [ # ... other Django apps ... 'health_check', 'health_check.db', # Checks database connection 'health_check.cache', # Checks cache backend 'health_check.storage', # Checks default file storage 'health_check.contrib.psutil', # Checks disk/memory usage (requires psutil) 'health_check.contrib.celery', # Checks Celery workers (requires celery) # Add more health_check.contrib.* apps as needed for your services ] # urls.py from django.urls import include, path urlpatterns = [ # ... other url patterns ... path('health/', include('health_check.urls')), ]
Debug
Known issues
breakingVersion 4.x introduced significant changes, particularly affecting custom integrations and the overall API. Review the 'Migration to v4.x' guide in the official documentation when upgrading from versions prior to 4.0.
fix
Consult the official migration guide for `django-health-check` when upgrading.
affects: <4.0 to 4.x
gotchaMany specific health checks (`health_check.contrib.*`) require additional Python packages to be installed (e.g., `psutil` for disk/memory, `celery` for Celery, `redis` for Redis). Simply adding the contrib app to `INSTALLED_APPS` without the underlying package will cause errors.
fix
Install optional dependencies using `pip install django-health-check[extra_package_name]` (e.g., `pip install django-health-check[psutil]`) or install the specific package directly (e.g., `pip install psutil`).
affects: All versions
deprecatedThe `health_check.contrib.migrations` check, which verified applied database migrations, was removed in version 3.23+.
fix
If you relied on this check, you may need to implement a custom check or find an alternative monitoring solution for database migrations.
affects: >=3.23
gotchaFor security, it is highly recommended to protect your health check endpoint, especially in production environments. If using a token-based approach, do NOT use Django's `SECRET_KEY`.
fix
Generate a separate, strong secret token for the health check URL (e.g., using `secrets.token_urlsafe()`) and configure your URL accordingly. Ensure HTTPS is enabled.
affects: All versions
gotchaIn high-availability environments with load balancers, be aware that checks like disk and memory usage will return responses specific to the individual node selected by the load balancer, not an aggregated status of the entire cluster.
fix
Account for node-specific responses in your monitoring strategy or consider aggregate metrics from a dedicated monitoring system.
affects: All versions
Upgrade
Version history
4.5.1latest on PyPI · released Aug 21, 2026
Audit
Dependencies
pythonrequiredRequired Python version.
psutiloptionalEnables disk and memory utilization checks (health_check.contrib.psutil).
celeryoptionalEnables Celery task queue checks (health_check.contrib.celery, health_check.contrib.celery_ping).
redisoptionalEnables Redis connection checks (health_check.contrib.redis).
kafka-pythonoptionalEnables Kafka checks (health_check.contrib.kafka).
pikaoptionalEnables RabbitMQ checks (health_check.contrib.rabbitmq).
feedparseroptionalEnables RSS/Atom feed checks (e.g., cloud provider status via health_check.contrib.rss).
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
1
Resources
django-health-check — pip install django-health-check · libregistry