Skip to main content

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:

  • write healtchecks just as you would write tests, using assertions;

  • collect and run healthchecks with test runners;

  • use healthchecks to validate deployments;

  • plug healthchecks in supervision and monitoring tools;

  • in case of incidents, use healthchecks to diagnose problems.

Example

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

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:

$ hospital-cli <YOUR-PACKAGE>.healthchecks

Project status

hospital is not full-featured yet. Some important features are in the roadmap. See also vision.

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

Resources

Metadata

Release files for hospital 0.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hospital 0.9
File Size Uploaded
hospital-0.9.zip 24.1 kB Details

Release files / hospital-0.9.zip

Download URL hospital-0.9.zip
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
a6b7c5e40400dcc1fc3ac5afce034ce3d9619393725130ae7599bb483dde4615
BLAKE2b-256 checksum
How to use checksums
fdd187073358804167cc530e66d91a547a00b8b864a63f56eabc70ad855ae4c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.9 This release

1 release file

0.8.1

1 release file

0.8

1 release file

0.7

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page