Deployment probe endpoints for Django applications.
Project description
django-deploy-probes
Production-ready HTTP deployment probe endpoints for Django applications.
Use django-deploy-probes for CI/CD deployment validation, Docker health checks, Kubernetes probes, blue-green deployments, and rollback checks.
Documentation
- Documentation site
- Basic setup
- Endpoint reference
- Security options
- Docker integration
- Docker Compose integration
- Kubernetes probes
- GitHub Actions deployment validation
Install
pip install django-deploy-probes
Optional extras:
pip install "django-deploy-probes[redis]"
pip install "django-deploy-probes[celery]"
pip install "django-deploy-probes[openapi]"
pip install "django-deploy-probes[all]"
Quick Start
INSTALLED_APPS = [
"django_deploy_probes",
]
from django.urls import include, path
urlpatterns = [
path("", include("django_deploy_probes.urls")),
]
Verify:
curl -f http://localhost:8000/healthz
curl -f http://localhost:8000/readyz
curl -f http://localhost:8000/version
Custom check messages are hidden by default. If you enable EXPOSE_CHECK_MESSAGES=True, do not include secrets or sensitive values in those messages.
Security checks use REMOTE_ADDR by default. If probes are accessed through a trusted reverse proxy, configure TRUSTED_PROXY_NETWORKS and CLIENT_IP_HEADER to resolve the original client IP safely.
Storage checks use Django storage aliases, so the same probe can validate local filesystems, S3-compatible backends, and any custom storage backend wired through STORAGES.
Common settings
DEPLOY_PROBES = {
"SERVICE_NAME": "my-django-app",
"ENVIRONMENT": "prod",
"VERSION": "1.2.0",
"READY_CHECKS": ["database", "redis", "celery", "storage"],
"STARTUP_CHECKS": ["migrations"],
"READY_CUSTOM_CHECKS": [],
"STARTUP_CUSTOM_CHECKS": [],
"DATABASES": ["default"],
"STORAGE": {
"default": {
"CHECK": "exists",
"PATH": "probes/ready.txt",
},
"s3_media": {
"CHECK": "write",
"PREFIX": "deploy-probes",
},
},
"REDIS": {
"default": {
"LOCATION": "redis://localhost:6379/0",
"TIMEOUT": 1.0,
},
},
"CELERY": {
"BROKER": True,
"WORKERS": False,
"RESULT_BACKEND": False,
"TIMEOUT": 1.0,
},
"DETAIL_LEVEL": "none",
"INCLUDE_CHECK_DURATIONS": False,
"REQUIRE_READY_CHECKS": False,
"REQUIRE_STARTUP_CHECKS": False,
"EXPOSE_CHECK_MESSAGES": False,
"INTERNAL_IP_ONLY": False,
"INTERNAL_IP_NETWORKS": [
"127.0.0.1/32",
"::1/128",
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
],
"TRUSTED_PROXY_NETWORKS": [],
"CLIENT_IP_HEADER": None,
}
STORAGE supports two practical modes:
CHECK="exists": verify that a known probe object exists.CHECK="write": create and delete a temporary object to verify write access.
For S3, exists is safer when you already manage a sentinel object like probes/ready.txt. Use write when you want to validate bucket write/delete permissions during readiness checks.
Development
uv sync --dev
uv run pytest -q
uv run mkdocs build --strict
Publishing is handled by .github/workflows/publish.yml when a GitHub release is published. Documentation is deployed to GitHub Pages from main by .github/workflows/docs.yml.
Project details
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_deploy_probes-0.2.1.tar.gz.
File metadata
- Download URL: django_deploy_probes-0.2.1.tar.gz
- Upload date:
- Size: 34.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b1f7342ca1c0808de9fe2edf4fed2dd67c848b6ba0040d742eaa0abc81bd1f2
|
|
| MD5 |
2ff30dfcbd4c1e503698bd8d0db95248
|
|
| BLAKE2b-256 |
39232f846a3562881351e15b3ce1b9ad7ce2ae19a70ee4a92f5c74b947d1edcc
|
File details
Details for the file django_deploy_probes-0.2.1-py3-none-any.whl.
File metadata
- Download URL: django_deploy_probes-0.2.1-py3-none-any.whl
- Upload date:
- Size: 16.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f03f091fb67f9a6c779c333ce5032457b270970f9504469790aa1a6829e970d
|
|
| MD5 |
c509730cc262642f6ef16da782956798
|
|
| BLAKE2b-256 |
4ac26a891833ca16b3511a9a0938f33b973bafab4d8de7ffd21cb953651466a2
|