Metadata-Version: 2.4
Name: django-healthkit
Version: 0.1.1
Summary: Health checks and monitoring toolkit for Django applications.
Author: CyberHuginn
License: MIT
Project-URL: Homepage, https://github.com/cyberhuginn/django-healthkit
Project-URL: Repository, https://github.com/cyberhuginn/django-healthkit
Project-URL: Issues, https://github.com/cyberhuginn/django-healthkit/issues
Keywords: django,health,monitoring,healthcheck,observability
Classifier: Framework :: Django
Classifier: Framework :: Django :: 5.2
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Django>=5.2
Dynamic: license-file

# django-healthkit

Lightweight and extensible health checks for Django applications.

`django-healthkit` helps you expose health check endpoints for your
Django services so they can be monitored by load balancers, container
platforms, and monitoring systems.

------------------------------------------------------------------------

## Features

-   Lightweight and dependency-free (Django only)
-   Class-based health endpoint
-   Database health check
-   Cache health check
-   Configurable via Django settings
-   Extensible architecture
-   Suitable for Docker and Kubernetes

------------------------------------------------------------------------

## Requirements

-   Python 3.10+
-   Django 5.2+

------------------------------------------------------------------------

## Installation

``` bash
pip install django-healthkit
```

------------------------------------------------------------------------

## Quick Start

### 1. Add the application

``` python
INSTALLED_APPS = [
    ...
    "django_healthkit",
    ...
]
```

### 2. Configure HealthKit

``` python
HEALTHKIT = {
    "CHECKS": [
        "django_healthkit.checks.database.DatabaseCheck",
        "django_healthkit.checks.cache.CacheCheck",
    ],
}
```

### 3. Register the endpoint

``` python
from django.urls import path

from django_healthkit.views import HealthView

urlpatterns = [
    path("health/", HealthView.as_view(), name="health"),
]
```

### 4. Visit

    GET /health/

------------------------------------------------------------------------

## Example Response

``` json
{
  "healthy": true,
  "checks": [
    {
      "name": "database",
      "healthy": true,
      "message": "Database is healthy.",
      "latency": 0.49
    },
    {
      "name": "cache",
      "healthy": true,
      "message": "Cache is healthy.",
      "latency": 0.57
    }
  ]
}
```

------------------------------------------------------------------------

## Why django-healthkit?

Modern applications require reliable health endpoints for orchestration
and monitoring.

`django-healthkit` provides a simple, extensible foundation for exposing
the health of your Django application without unnecessary dependencies.

------------------------------------------------------------------------

## Roadmap

-   Disk health check
-   Memory health check
-   CPU health check
-   Custom check registration
-   Async health checks
-   Prometheus exporter
-   OpenTelemetry integration

------------------------------------------------------------------------

## Contributing

Contributions, issues, and feature requests are welcome.

------------------------------------------------------------------------

## License

MIT
