Skip to main content

Exposes an http endpoint exposing the health status of the app

Project description

pipeline status coverage report PyPI Status PyPI Version PyPI Python PyPI License PyPI Format

Applipy HealthCheck Metrics

pip install applipy_healthcheck

Exposes the health status of the applipy application through an HTTP endpoint with path /health.


Add the applipy_healthcheck.HealthCheckModule to your application. Optionally, define through which http server to expose the /health endpoint, if no name is given it defaults to the anonymous server:

# dev.yaml

    name: demo
        - applipy_healthcheck.HealthCheckModule

- name: internal
  port: 8080

healthcheck.server_name: internal

To run this test just install applipy_healthcheck and pyyaml and run the applipy application:

pip install applipy_healthcheck pyyaml
python -m applipy

You can now query and you should see OK being returned.

Custom health checks

applipy_healthcheck exposes the HealthChecker interface. You can implement your own and the health check endpoint will use it to determine the health of the system.


Full healthcheck module config

All keys and their default values:

  server_name: null
  verbose: false

Usage with custom HealthChecker


from applipy import Module
from applipy_healthcheck import HealthChecker

class MyHealthChecker(HealthChecker):

    async def check(self):
        is_healthy = True
        status_message = 'All OK'
        return is_healthy, status_message

class MyModule(Module):
    def configure(self, bind, register):
        bind(HealthChecker, MyHealthChecker)

    def depends_on(cls):
        return HealthCheckModule,
# dev.yaml

  name: test
  modules: [mymodule.MyModule]

- host:
  port: 8080

Project details

Download files

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

Source Distribution

applipy_healthcheck-0.2.0.tar.gz (4.0 kB view hashes)

Uploaded source

Built Distribution

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page