Skip to content

brandonvu99/health-checks-io-python-runner

Repository files navigation

Healthchecks.io Python Runner

Just a simple wrapper around the Start, Success, and Failure endpoints of the Healthchecks.io ping api.

Install

Directly using pip

pip install git+https://github.com/brandonvu99/health-checks-io-python-runner.git

Usage

# Contents of minimal_working_example.py
from health_checks_io_runner import HealthChecksIoRunner, ScriptStatus


def my_work() -> ScriptStatus:
    # Do some work.

    if some_work_was_valid:
        return ScriptStatus(
            is_success=True, message="my cool, custom, optional success message"
        )

    return ScriptStatus(
        is_success=False, message="my cool, custom, optional failure message"
    )


def main():
    HealthChecksIoRunner.run(my_work, "http://myhealthchecksioinstance.com/ping/check-uuid")


if __name__ == "__main__":
    main()

How to run tests with docker

docker compose up --no-deps --build

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages