<commit_before>IRaT support for Django
=======================

A set of tools to make it easier to add a Django-based service to Ministry of Justice's Incidence Response and Tuning:

* ping.json view
* healthcheck.json view with extensible healthchecks

healthcheck.json
----------------

Django settings:

.. code-block:: python

    HEALTHCHECKS = [
        'moj_irat.healthcheck_registry.database_healthcheck',
        # override default list of healthcheck callables
    ]
    AUTODISCOVER_HEALTHCHECKS = True  # whether to autodiscover and load healthcheck.py from all installed apps

Installation
------------

At the moment, the only way to install the library is from github

.. code-block:: bash

    pip install git+https://github.com/ministryofjustice/django-moj-irat.git<commit_msg>Fix read-me instructions<commit_after>IRaT support for Django
=======================

A set of tools to make it easier to add a Django-based service to Ministry of Justice's Incidence Response and Tuning:

* ping.json view
* healthcheck.json view with extensible healthchecks

healthcheck.json
----------------

Django settings:

.. code-block:: python

    HEALTHCHECKS = [
        'moj_irat.healthchecks.database_healthcheck',
        # override default list of healthcheck callables
    ]
    AUTODISCOVER_HEALTHCHECKS = True  # whether to autodiscover and load healthcheck.py from all installed apps

Installation
------------

At the moment, the only way to install the library is from github

.. code-block:: bash

    pip install git+https://github.com/ministryofjustice/django-moj-irat.git
{'fraction_non_alphanumeric': 0.12115505335844319, 'fraction_numerical': 0.0, 'mean_word_length': 3.379120879120879, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2908602', 'n_tokens_mistral': 458, 'n_tokens_neox': 430, 'n_words': 153}