Simple Django health check
Project description
django-simple-health-check
Simple Django health check
Inspired by:
Installation
$ pip install django-simple-health-check
Use
pip install django-simple-health-check[psutil]
for usingsimple_health_check.checks.ps.*
checks.
Quick start
-
Install the package
-
Add
simple_health_check
to your INSTALLED_APPS settings like this:
INSTALLED_APPS = [
...,
'simple_health_check',
...,
]
- Add
simple_health_check.urls
to mainurls.py
:
from django.urls import path, include
urlpatterns = [
...,
path('', include('simple_health_check.urls')),
...,
]
- Configure the readiness checks:
SIMPLE_HEALTH_CHECKS = {
'simple_health_check.checks.migrations.Migrations': [
dict(alias='default'),
dict(alias='db2'),
],
'simple_health_check.checks.db.Databases': None,
# The simplest way to add your own check
'your_package.path_to_checks.SomeCheck': {...} or [{...}, ...] or None,
}
by default
SIMPLE_HEALTH_CHECKS = {
'simple_health_check.checks.migrations.Migrations': None, # check all aliases
'simple_health_check.checks.db.Databases': None, # check all aliases
}
Built-in checks
A check | Built-in/expected |
---|---|
simple_health_check.checks.db.Databases | :heavy_check_mark: |
simple_health_check.checks.migrations.Migrations | :heavy_check_mark: |
simple_health_check.checks.caches.CacheBackends | :heavy_check_mark: |
simple_health_check.checks.ps.DiskUsage | :heavy_check_mark: |
simple_health_check.checks.ps.MemoryUsage | :heavy_check_mark: |
simple_health_check.checks.dummy.DummyTrue | :heavy_check_mark: |
simple_health_check.checks.dummy.DummyFalse | :heavy_check_mark: |
emails | :hourglass_flowing_sand: |
queues | :hourglass_flowing_sand: |
storages | :hourglass_flowing_sand: |
License
MIT
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
File details
Details for the file django-simple-health-check-0.6.1.tar.gz
.
File metadata
- Download URL: django-simple-health-check-0.6.1.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69755a538e54189703f9d81fe605ce0ea0c1d76816015fe641a141c5d5432622 |
|
MD5 | c2aa613508d9cf3767b1b546ed3f4db8 |
|
BLAKE2b-256 | 732952555857064237fedd70fe2bde22952b00a09b778e3f20efc8a5cd262a39 |
File details
Details for the file django_simple_health_check-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: django_simple_health_check-0.6.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e84955b24b3b6dad5ec09dcb6adbd6e31c2151a84134335187817531d0196b07 |
|
MD5 | 2d6baabec3999a4b63f611065726df92 |
|
BLAKE2b-256 | 33f05c9c9392d7c22fb1760a60e2326edef0230ef8576d339f293aee32567d8b |