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 details)

Uploaded Source

Built Distribution

File details

Details for the file fastapi-healthcheck-flagman-0.0.8.tar.gz.

File metadata

  • Download URL: fastapi-healthcheck-flagman-0.0.8.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fastapi-healthcheck-flagman-0.0.8.tar.gz
Algorithm Hash digest
SHA256 a153ac11845489eed2a12421e7f3209148ecbb0493ec87bbb8b027ef94f5f1aa
MD5 bffc94af00c52a31bbe618c146e09428
BLAKE2b-256 2ec5c0fa7ba4959442601d2767d334405f919be015948d17e4f33da59d6fcf87

See more details on using hashes here.

File details

Details for the file fastapi_healthcheck_flagman-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: fastapi_healthcheck_flagman-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 4.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.7

File hashes

Hashes for fastapi_healthcheck_flagman-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 2aa0dbaabe74aeb0a330db3d4c3b064848bc6b707012cd7980c93a3c1d2c2b08
MD5 1b50443ef76858a3a49d6f4ae6703a37
BLAKE2b-256 29bbe4485c7f6a0fa069c1575b79002bfb03cfcbe0a60d615c5b4d766ff30d49

See more details on using hashes here.

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