Skip to main content

A small healthcheck package for adding /healthcheck routes to FastAPI projects

Project description

FastAPI Healthcheck package

import fastapi_healthcheck
app = FastAPI(...)

class WorkerChecker(healthcheck.base.Base):    
    def check(self):
        status = False 
        # code that checks health
        time_passed_for_check = 1.0
        return {"name": self.name, "status": status, "optional": self.optional, "time": time_passed_for_check}

fastapi_healthcheck.add_health_route(app, name="Super-Resolution", checkers=[
    healthcheck.redis.Checker(),  #built-in checker
    WorkerChecker(name="Worker Checker") #custom checker
])

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

fastapi-healthcheck-flagman-0.0.8.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page