# directory-healthcheck
[![code-climate-image]][code-climate]
[![circle-ci-image]][circle-ci]
[![codecov-image]][codecov]
[![pypi-image]][pypi]
**Wrapper around [django-health-check](https://github.com/KristianOellegaard/django-health-check) to streamline health checks in [directory apps](https://github.com/uktrade/?utf8=%E2%9C%93&q=directory&type=&language=).**
---
## Installation
```shell
pip install directory-healthcheck
```
## Usage
Update your `settings.py`:
```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
[code-climate-image]: https://codeclimate.com/github/uktrade/directory-healthcheck/badges/issue_count.svg
[code-climate]: https://codeclimate.com/github/uktrade/directory-healthcheck
[circle-ci-image]: https://circleci.com/gh/uktrade/directory-healthcheck/tree/master.svg?style=svg
[circle-ci]: https://circleci.com/gh/uktrade/directory-healthcheck/tree/master
[codecov-image]: https://codecov.io/gh/uktrade/directory-healthcheck/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/uktrade/directory-healthcheck
[pypi-image]: https://badge.fury.io/py/directory-healthcheck.svg
[pypi]: https://badge.fury.io/py/directory-healthcheck
Raw data
{
"_id": null,
"home_page": "https://github.com/uktrade/directory-healthcheck",
"name": "directory-healthcheck",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Department for International Trade",
"author_email": "",
"download_url": "",
"platform": null,
"description": "# directory-healthcheck\n\n[![code-climate-image]][code-climate]\n[![circle-ci-image]][circle-ci]\n[![codecov-image]][codecov]\n[![pypi-image]][pypi]\n\n**Wrapper around [django-health-check](https://github.com/KristianOellegaard/django-health-check) to streamline health checks in [directory apps](https://github.com/uktrade/?utf8=%E2%9C%93&q=directory&type=&language=).**\n\n---\n\n## Installation\n\n```shell\npip install directory-healthcheck\n```\n\n## Usage\nUpdate your `settings.py`:\n\n```py\nimport directory_healthcheck.backends\n\n\nINSTALLED_APPS = [\n ...\n 'directory_healthcheck',\n ...\n]\n\nDIRECTORY_HEALTHCHECK_TOKEN = 'some-secret-token'\n\nDIRECTORY_HEALTHCHECK_BACKENDS [\n directory_healthcheck.backends.APIBackend,\n directory_healthcheck.backends.SingleSignOnBackend,\n directory_healthcheck.backends.FormsAPIBackend,\n]\n\n```\n\nUpdate your `urls.py`:\n\n```\n url(\n r'^healthcheck/$',\n directory_healthcheck.views.HealthcheckView.as_view(),\n name='healthcheck'\n ),\n\n```\n\n\n## Development\n\n $ git clone https://github.com/uktrade/directory-healthcheck\n $ cd directory-healthcheck\n $ make\n\n## Publish to PyPI\n\nThe 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:\n\n| Setting |\n| --------------------------- |\n| DIRECTORY_PYPI_USERNAME |\n| DIRECTORY_PYPI_PASSWORD |\n\n\nThen run the following command:\n\n make publish\n\n\n[code-climate-image]: https://codeclimate.com/github/uktrade/directory-healthcheck/badges/issue_count.svg\n[code-climate]: https://codeclimate.com/github/uktrade/directory-healthcheck\n\n[circle-ci-image]: https://circleci.com/gh/uktrade/directory-healthcheck/tree/master.svg?style=svg\n[circle-ci]: https://circleci.com/gh/uktrade/directory-healthcheck/tree/master\n\n[codecov-image]: https://codecov.io/gh/uktrade/directory-healthcheck/branch/master/graph/badge.svg\n[codecov]: https://codecov.io/gh/uktrade/directory-healthcheck\n\n[pypi-image]: https://badge.fury.io/py/directory-healthcheck.svg\n[pypi]: https://badge.fury.io/py/directory-healthcheck\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Library to streamline healthchecks for Directory apps.",
"version": "3.5",
"project_urls": {
"Homepage": "https://github.com/uktrade/directory-healthcheck"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dc900913f06166d8aad760a57ec151d12f09cf4348e7155a65668fc735824b5a",
"md5": "a6604200b75d1274b567d4260c50b6b6",
"sha256": "21a11a99bd5522100f966d46a2ec5831f8e3de7a0bc71f93850d4e92620d9c0d"
},
"downloads": -1,
"filename": "directory_healthcheck-3.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a6604200b75d1274b567d4260c50b6b6",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 5582,
"upload_time": "2024-03-05T14:21:38",
"upload_time_iso_8601": "2024-03-05T14:21:38.260393Z",
"url": "https://files.pythonhosted.org/packages/dc/90/0913f06166d8aad760a57ec151d12f09cf4348e7155a65668fc735824b5a/directory_healthcheck-3.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-05 14:21:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "uktrade",
"github_project": "directory-healthcheck",
"travis_ci": false,
"coveralls": true,
"github_actions": false,
"circle": true,
"lcname": "directory-healthcheck"
}