Skip to main content

Resource health checks for Django.

Project description

Django Canary Endpoint
======================

Provides [canary endpoints](http://byterot.blogspot.com/2014/11/health-endpoint-in-api-design-slippery-rest-api-design-canary-endpoint-hysterix-asp-net-web-api.html)
for common Django dependencies.


### Installation

pip install django-canary-endpoint


### Quickstart

```python
# Canary
########

from canary_endpoint import GitCanary
from canary_endpoint.resources.databases import DjangoDatabase
from canary_endpoint.resources.rq import DjangoRQ
from canary_endpoint.resources.services import Service, ServiceWithCanary

canary = GitCanary('example', root=ROOT, version=VERSION, resources=[
DjangoDatabase(statements=['SELECT 1 FROM foo LIMIT 1']),
DjangoRQ(),
Service('foo', url=HTTP_ENDPOINT),
ServiceWithCanary('bar', url=HTTP_ENDPOINT_WITH_CANARY),
])


# URLs
######

from canary_endpoint.views import status
from django.conf.urls import patterns, url

urlpatterns = patterns('', url(r'^_status/$', status, {'canary': canary}))
```

See the [example project](./tests/projects/example.py) for full configuration.

Also see the [example response data](./tests/fixtures/ok.json).


### Testing

make test
open coverage/index.html

For more thorough multi-Django version testing, (`arc lint` will not run this)
use:

tox


### License

The MIT License (MIT)

Copyright 2015 ATX Innovations

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-canary-endpoint-0.3.0.tar.gz (8.8 kB view hashes)

Uploaded Source

Built Distribution

django_canary_endpoint-0.3.0-py2.py3-none-any.whl (14.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

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