Skip to main content

Health checks for Python.

Project description

hospital makes it easy to setup and use health checks in Python.

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

  • while developing the application, write health checks ;
  • after a deployment, run health checks to make sure everything went fine ;
  • include health checks in supervision/monitoring tools ;
  • in case of incidents, use health checks to diagnose problems.


from hospital import HealthCheck

class DatabaseHealthCheck(HealthCheck):
    def test_open_connection(self):
        """Can open connection to database."""

    def test_ping_host(self):
        """Can ping database host."""

    def test_driver(self):
        """Database's client library for Python can be imported."""

    def diagnose_database_connection(self):
        """Can connect to database."""

    def fix_database_driver(self):
        """Trigger installation of database library."""
        my_provisioner.install(database_library, confirm=True)

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date (12.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page