Skip to main content

Library to streamline healthchecks for Directory apps.

Project description

directory-healthcheck

code-climate-image circle-ci-image codecov-image pypi-image

Wrapper around django-health-check to streamline health checks in directory apps.


Installation

pip install directory-healthcheck

Usage

Update your settings.py:

import directory_healthcheck.backends


INSTALLED_APPS = [
    ...
    'directory_healthcheck',
    ...
]

DIRECTORY_HEALTHCHECK_TOKEN = 'some-secret-token'

DIRECTORY_HEALTHCHECK_BACKENDS [
    directory_healthcheck.backends.APIBackend,
    directory_healthcheck.backends.SingleSignOnBackend,
    directory_healthcheck.backends.FormsAPIBackend,
]

Update your urls.py:

    url(
        r'^healthcheck/$',
        directory_healthcheck.views.HealthcheckView.as_view(),
        name='healthcheck'
    ),

Development

$ git clone https://github.com/uktrade/directory-healthcheck
$ cd directory-healthcheck
$ make

Publish to PyPI

The package should be published to PyPI on merge to master. If you need to do it locally then get the credentials from rattic and add the environment variables to your host machine:

Setting
DIRECTORY_PYPI_USERNAME
DIRECTORY_PYPI_PASSWORD

Then run the following command:

make publish

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

directory_healthcheck-3.8-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file directory_healthcheck-3.8-py3-none-any.whl.

File metadata

File hashes

Hashes for directory_healthcheck-3.8-py3-none-any.whl
Algorithm Hash digest
SHA256 04d4892c0100eb9c7df37b08e7e3c06bc10db97e5f61f700a48dee9a3fb14e81
MD5 4a8b930f1fea9ffb5471a6c40d35e6a9
BLAKE2b-256 a1b6c599ff08e81e64f0f0ca27e00b960984f25b21460da8d3e20eae04be17e0

See more details on using hashes here.

Supported by

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