Skip to main content

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.

PyPI Django Packages Python Django License uv

Documentation

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.

Common settings

DEPLOY_PROBES = {
    "SERVICE_NAME": "my-django-app",
    "ENVIRONMENT": "prod",
    "VERSION": "1.2.0",
    "READY_CHECKS": ["database", "redis", "celery"],
    "STARTUP_CHECKS": ["migrations"],
    "READY_CUSTOM_CHECKS": [],
    "STARTUP_CUSTOM_CHECKS": [],
    "DATABASES": ["default"],
    "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,
}

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

django_deploy_probes-0.2.0.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

django_deploy_probes-0.2.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file django_deploy_probes-0.2.0.tar.gz.

File metadata

  • Download URL: django_deploy_probes-0.2.0.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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

Hashes for django_deploy_probes-0.2.0.tar.gz
Algorithm Hash digest
SHA256 0378423273020d124a0501ac09c258dc686381fedc3663f5247711e5ecb8eb56
MD5 15ab4ec0ec5f1d460bb202ef44d4cebc
BLAKE2b-256 4ef9d2e8f99155b08337174c3030d161f2d5d5e975d4f89c134199ee3c243ba7

See more details on using hashes here.

File details

Details for the file django_deploy_probes-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: django_deploy_probes-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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

Hashes for django_deploy_probes-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 206beef501e97d9a6e85a77f8b2c5777a55402b2ae6c9d3eaaafa8117c4ccbd9
MD5 008f60cf0e165e983d771de7847d6797
BLAKE2b-256 945fb4ad0adf24e5a11a16dcde1d20c772610aa6350f81e6eb0d528efcafbc22

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page