python-hospital / hospital

Tools to diagnose Python projects (supervision, monitoring).
Other
40 stars 8 forks source link

################################# hospital: healthchecks for Python #################################

hospital is a Python framework to write health checks, smoke tests or diagnoses around applications or services.


Abstract


Health checks are kind of tests, applied to running applications and services:


Example


In your project's root package, have a healthchecks package or module, where you assert your (running) application or service is ok:

.. code:: python

import unittest import hospital

@hospital.healthcheck class DocumentationHealthCheck(unittest.TestCase): def test_http_200(self): url = 'http://hospital.readthedocs.org/en/0.6/' hospital.assert_http_response(url, status_code=200)

Then you can collect and run the healthchecks with command line or web service. Here is an example with command line:

.. code:: console

$ hospital-cli .healthchecks


Project status


hospital is not full-featured yet. Some important features are in the roadmap <https://github.com/python-hospital/hospital/milestones>. See also vision <http://hospital.readthedocs.org/en/latest/about/vision.html>.

Of course, any ideas, feedback or help are welcome :)


Resources