django-simple-health-check


Namedjango-simple-health-check JSON
Version 0.6.1 PyPI version JSON
download
home_pagehttps://github.com/pikhovkin/django-simple-health-check
SummarySimple Django health check
upload_time2023-12-05 19:27:27
maintainer
docs_urlNone
authorSergei Pikhovkin
requires_python>=3.7,<4.0
licenseMIT
keywords django monitoring healthcheck health-check ping health-checks healthchecks liveness readiness liveness-detection readiness-checker django-health-check readiness-detection liveness-checker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # django-simple-health-check

[![GitHub Actions](https://github.com/pikhovkin/django-simple-health-check/workflows/build/badge.svg)](https://github.com/pikhovkin/django-simple-health-check/actions)
[![PyPI](https://img.shields.io/pypi/v/django-simple-health-check.svg)](https://pypi.org/project/django-simple-health-check/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-simple-health-check.svg)
[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)
![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-simple-health-check.svg)
[![PyPI - License](https://img.shields.io/pypi/l/django-simple-health-check)](./LICENSE)

Simple Django health check

Inspired by:
- [django-alive](https://github.com/lincolnloop/django-alive)
- [django-healthchecks](https://github.com/mvantellingen/django-healthchecks)
- [django-health-check](https://github.com/KristianOellegaard/django-health-check)
- [django-healthz](https://github.com/rehive/django-healthz)
- [django-watchman](https://github.com/mwarkentin/django-watchman)

### Installation

```bash
$ pip install django-simple-health-check
```

> Use `pip install django-simple-health-check[psutil]` for using `simple_health_check.checks.ps.*` checks.


### Quick start

1. Install the package

2. Add `simple_health_check` to your INSTALLED_APPS settings like this:

```python
INSTALLED_APPS = [
    ...,
    'simple_health_check',
    ...,
]
```

3. Add `simple_health_check.urls` to main `urls.py`:

```python
from django.urls import path, include

urlpatterns = [
    ...,
    path('', include('simple_health_check.urls')),
    ...,
]
```

4. Configure the readiness checks:

```python
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

```python
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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/pikhovkin/django-simple-health-check",
    "name": "django-simple-health-check",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "django,monitoring,healthcheck,health-check,ping,health-checks,healthchecks,liveness,readiness,liveness-detection,readiness-checker,django-health-check,readiness-detection,liveness-checker",
    "author": "Sergei Pikhovkin",
    "author_email": "s@pikhovkin.ru",
    "download_url": "https://files.pythonhosted.org/packages/73/29/52555857064237fedd70fe2bde22952b00a09b778e3f20efc8a5cd262a39/django-simple-health-check-0.6.1.tar.gz",
    "platform": null,
    "description": "# django-simple-health-check\n\n[![GitHub Actions](https://github.com/pikhovkin/django-simple-health-check/workflows/build/badge.svg)](https://github.com/pikhovkin/django-simple-health-check/actions)\n[![PyPI](https://img.shields.io/pypi/v/django-simple-health-check.svg)](https://pypi.org/project/django-simple-health-check/)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/django-simple-health-check.svg)\n[![framework - Django](https://img.shields.io/badge/framework-Django-0C3C26.svg)](https://www.djangoproject.com/)\n![PyPI - Django Version](https://img.shields.io/pypi/djversions/django-simple-health-check.svg)\n[![PyPI - License](https://img.shields.io/pypi/l/django-simple-health-check)](./LICENSE)\n\nSimple Django health check\n\nInspired by:\n- [django-alive](https://github.com/lincolnloop/django-alive)\n- [django-healthchecks](https://github.com/mvantellingen/django-healthchecks)\n- [django-health-check](https://github.com/KristianOellegaard/django-health-check)\n- [django-healthz](https://github.com/rehive/django-healthz)\n- [django-watchman](https://github.com/mwarkentin/django-watchman)\n\n### Installation\n\n```bash\n$ pip install django-simple-health-check\n```\n\n> Use `pip install django-simple-health-check[psutil]` for using `simple_health_check.checks.ps.*` checks.\n\n\n### Quick start\n\n1. Install the package\n\n2. Add `simple_health_check` to your INSTALLED_APPS settings like this:\n\n```python\nINSTALLED_APPS = [\n    ...,\n    'simple_health_check',\n    ...,\n]\n```\n\n3. Add `simple_health_check.urls` to main `urls.py`:\n\n```python\nfrom django.urls import path, include\n\nurlpatterns = [\n    ...,\n    path('', include('simple_health_check.urls')),\n    ...,\n]\n```\n\n4. Configure the readiness checks:\n\n```python\nSIMPLE_HEALTH_CHECKS = {\n    'simple_health_check.checks.migrations.Migrations': [\n        dict(alias='default'),\n        dict(alias='db2'),\n    ],\n    'simple_health_check.checks.db.Databases': None,\n\n    # The simplest way to add your own check\n    'your_package.path_to_checks.SomeCheck': {...} or [{...}, ...] or None,\n}\n```\n\nby default\n\n```python\nSIMPLE_HEALTH_CHECKS = {\n    'simple_health_check.checks.migrations.Migrations': None,  # check all aliases\n    'simple_health_check.checks.db.Databases': None,  # check all aliases\n}\n```\n\n### Built-in checks\n\n| A check                                          |     Built-in/expected    |\n|--------------------------------------------------|:------------------------:|\n| simple_health_check.checks.db.Databases          |    :heavy_check_mark:    |\n| simple_health_check.checks.migrations.Migrations |    :heavy_check_mark:    |\n| simple_health_check.checks.caches.CacheBackends  |    :heavy_check_mark:    |\n| simple_health_check.checks.ps.DiskUsage          |    :heavy_check_mark:    |\n| simple_health_check.checks.ps.MemoryUsage        |    :heavy_check_mark:    |\n| simple_health_check.checks.dummy.DummyTrue       |    :heavy_check_mark:    |\n| simple_health_check.checks.dummy.DummyFalse      |    :heavy_check_mark:    |\n| emails                                           | :hourglass_flowing_sand: |\n| queues                                           | :hourglass_flowing_sand: |\n| storages                                         | :hourglass_flowing_sand: |\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple Django health check",
    "version": "0.6.1",
    "project_urls": {
        "Homepage": "https://github.com/pikhovkin/django-simple-health-check"
    },
    "split_keywords": [
        "django",
        "monitoring",
        "healthcheck",
        "health-check",
        "ping",
        "health-checks",
        "healthchecks",
        "liveness",
        "readiness",
        "liveness-detection",
        "readiness-checker",
        "django-health-check",
        "readiness-detection",
        "liveness-checker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "33f05c9c9392d7c22fb1760a60e2326edef0230ef8576d339f293aee32567d8b",
                "md5": "2d6baabec3999a4b63f611065726df92",
                "sha256": "e84955b24b3b6dad5ec09dcb6adbd6e31c2151a84134335187817531d0196b07"
            },
            "downloads": -1,
            "filename": "django_simple_health_check-0.6.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2d6baabec3999a4b63f611065726df92",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 9759,
            "upload_time": "2023-12-05T19:27:25",
            "upload_time_iso_8601": "2023-12-05T19:27:25.956138Z",
            "url": "https://files.pythonhosted.org/packages/33/f0/5c9c9392d7c22fb1760a60e2326edef0230ef8576d339f293aee32567d8b/django_simple_health_check-0.6.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "732952555857064237fedd70fe2bde22952b00a09b778e3f20efc8a5cd262a39",
                "md5": "c2aa613508d9cf3767b1b546ed3f4db8",
                "sha256": "69755a538e54189703f9d81fe605ce0ea0c1d76816015fe641a141c5d5432622"
            },
            "downloads": -1,
            "filename": "django-simple-health-check-0.6.1.tar.gz",
            "has_sig": false,
            "md5_digest": "c2aa613508d9cf3767b1b546ed3f4db8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 6366,
            "upload_time": "2023-12-05T19:27:27",
            "upload_time_iso_8601": "2023-12-05T19:27:27.273754Z",
            "url": "https://files.pythonhosted.org/packages/73/29/52555857064237fedd70fe2bde22952b00a09b778e3f20efc8a5cd262a39/django-simple-health-check-0.6.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-05 19:27:27",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "pikhovkin",
    "github_project": "django-simple-health-check",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "django-simple-health-check"
}
        
Elapsed time: 0.16960s