{"id":8121,"library":"django-watchman","title":"Django Watchman","description":"django-watchman exposes a status endpoint for your backing services like databases, caches, and other services. It is currently at version 1.5.0 and maintains an active release cadence with regular updates and security fixes.","status":"active","version":"1.5.0","language":"python","source_language":"en","source_url":"https://github.com/mwarkentin/django-watchman","tags":["django","health check","monitoring","status","liveness","readiness"],"install":[{"cmd":"pip install django-watchman","lang":"bash","label":"Install stable version"}],"dependencies":[{"reason":"As a Django pluggable application, it requires Django to function. Supports Django 4.2, 5.1, and 5.2.","package":"Django","optional":false},{"reason":"Requires Python >=3.10.","package":"Python","optional":false}],"imports":[{"wrong":"from django.urls import re_path, include","symbol":"watchman","correct":"import watchman"}],"quickstart":{"code":"import os\n\n# settings.py\nINSTALLED_APPS = [\n    # ... other apps\n    'watchman',\n]\n\n# urls.py\nfrom django.urls import re_path, include\n\nurlpatterns = [\n    # ... other url patterns\n    re_path(r'^watchman/', include('watchman.urls')),\n    # For a minimal status endpoint (optional)\n    # from watchman.views import bare_status\n    # re_path(r'^watchman/bare/$', bare_status),\n]\n\n# Optional: Protect with a token (add to settings.py)\n# WATCHMAN_TOKEN = os.environ.get('WATCHMAN_TOKEN', 'your_secret_token')\n\n# Run checks from command line (optional)\n# python manage.py watchman -v 2","lang":"python","description":"To quickly integrate `django-watchman`, add 'watchman' to your `INSTALLED_APPS` and include `watchman.urls` in your project's `urls.py`. This will provide a JSON status endpoint at `/watchman/` and an HTML dashboard at `/watchman/dashboard/`. For a simpler liveness probe, the `/watchman/ping/` endpoint is also available."},"warnings":[{"fix":"Upgrade your Python environment to 3.10+ and Django to 2.0+ (preferably 4.2+), and remove `django-jsonview` from your dependencies if upgrading from pre-1.0.0 versions.","message":"Version 1.0.0 dropped support for Python 2 and Django versions older than 2.0. Additionally, it removed the dependency on `django-jsonview` in favor of Django's built-in `JsonResponse`.","severity":"breaking","affected_versions":"<1.0.0"},{"fix":"Ensure your `urls.py` uses `re_path(r'^watchman/', include('watchman.urls'))` for compatibility with Django 3.1+.","message":"Prior to version 1.3.0, `django-watchman` used `django.conf.urls.url()`. This function has been deprecated in modern Django versions (3.1+), which now primarily use `re_path()` or `path()`.","severity":"deprecated","affected_versions":"<1.3.0"},{"fix":"If you encounter `TypeError: 'str' object is not iterable` or `ImportError` related to `WATCHMAN_CHECKS`, change your setting from `WATCHMAN_CHECKS = 'single.check'` to `WATCHMAN_CHECKS = ('single.check',)` or `WATCHMAN_CHECKS = ['single.check']`.","message":"When configuring `WATCHMAN_CHECKS` in your settings, ensure it is a sequence (e.g., a list or a tuple), not a single string. For a tuple with one item, remember the trailing comma: `('my.custom.check',)`.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Upgrade to `django-watchman` 1.5.0 or newer, which addresses this by using `SELECT 1 FROM DUAL` for Oracle.","message":"The database health check in `django-watchman` might fail for Oracle databases when using `SELECT 1` without a `FROM` clause.","severity":"gotcha","affected_versions":"<1.5.0"},{"fix":"Upgrade to `django-watchman` 1.4.0 or newer to mitigate the ReDoS vulnerability.","message":"Version 1.4.0 included a security fix for a Regular Expression Denial of Service (ReDoS) vulnerability in the Authorization header parsing. Crafted input could lead to polynomial backtracking.","severity":"gotcha","affected_versions":"<1.4.0"}],"env_vars":null,"search_vec":"'1.5.0':25 'activ':29 'back':12 'cach':16 'cadenc':31 'check':40 'current':22 'databas':15 'django':1,4,38 'django-watchman':3 'endpoint':9 'expos':6 'fix':37 'health':39 'like':14 'live':43 'maintain':27 'monitor':41 'readi':44 'regular':33 'releas':30 'secur':36 'servic':13,19 'status':8,42 'updat':34 'version':24 'watchman':2,5","created_at":"2026-04-16T17:00:33.436110+00:00","updated_at":"2026-04-16T17:00:33.436110+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.5.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/mwarkentin/django-watchman","docs":"https://django-watchman.readthedocs.io","changelog":"https://github.com/mwarkentin/django-watchman/blob/main/CHANGELOG.md","pypi":"https://pypi.org/project/django-watchman/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["web-framework","database","observability"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-30","last_verified":"2026-06-30","next_check":"2026-07-30","install_tag":null}}