Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Resource health checks for Django.

Project Description

[![Build Status](](

Django Canary Endpoint

Provides [canary endpoints](
for common Django dependencies.

### Installation

pip install django-canary-endpoint

If you use RQ you also need to install the `rq` extra:

pip install django-canary-endpoint[rq]

### Quickstart

# Canary

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

canary = GitCanary('example', root=ROOT, version=VERSION, resources=[
DjangoDatabase(statements=['SELECT 1 FROM foo LIMIT 1']),
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/ for full configuration.

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

### Testing

There are several ways to run the projects tests. The recommended approach
is to run `tox`, becuase your testing environment will be properly set-up.

For a thorough multi-Django version testing use:

$ tox

To list the configured environments:

$ tox -l

You can execute a single test environment:

$ tox -e py35-django18

If you manage your own environment, you can run the `make test` command
yourself. It is recommened that you do this in a _virtualenv_.

$ pip install -r requirements.txt # Normally tox would install these
$ pip install "django<1.9" django-rq # Normally tox would install these
$ make test
$ open coverage/index.html

You can run a subset of tests by setting the `PACKAGES` variable:

$ make PACKAGES="tests.test_endpoint tests.test_service_resources"

To run a single test:

$ make PACKAGES=tests.test_endpoint:EndpointTestCase.test_status_endpoint_returns_200_on_success

### License

The MIT License (MIT)

Copyright 2016 ATX Innovations

Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, Size & Hash SHA256 Hash Help File Type Python Version Upload Date
(8.8 kB) Copy SHA256 Hash SHA256
Source None Mar 9, 2017

Supported By

Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Kabu Creative Kabu Creative UX & Design Google Google Cloud Servers Fastly Fastly CDN StatusPage StatusPage Statuspage DigiCert DigiCert EV Certificate