Skip to main content

FastAPI health check extension for Kubernetes liveness, readiness, and startup probes.

Project description

logo

FastAPI health check extension for Kubernetes liveness, readiness, and startup probes


Installation

pip install gadfasthealth

Usage

def check_redis() -> bool:
    return False

async def check_db() -> bool:
    return True

app = fastapi.FastAPI()

health = Health(
    ("/-/liveness", check_db),
    ("/-/readiness", check_db, check_redis),
    ("/-/startup", check_db),
    ("/-/custom"),
)

app.include_router(health.router)

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

gadfasthealth-0.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gadfasthealth-0.0.1-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file gadfasthealth-0.0.1.tar.gz.

File metadata

  • Download URL: gadfasthealth-0.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gadfasthealth-0.0.1.tar.gz
Algorithm Hash digest
SHA256 4691f8443904d1ee1561a127c39a11f8145524775564fb3bd1543ffd8dc26956
MD5 02e810ece1b2526790c490130ca6132e
BLAKE2b-256 1970f9c960f4792ec4f533f7629dfaaadfa6d99a969da4179fce5f91b5afd7fc

See more details on using hashes here.

File details

Details for the file gadfasthealth-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: gadfasthealth-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gadfasthealth-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ed630921b53997b3460c9c8757d4129690b0f5dea76563d0ec43a6b07f62173d
MD5 4bc2eb2e1e8dc52762087eb0580557f1
BLAKE2b-256 3d53f48386f02a19b89b370cedc7f531206180efa5c512e763db1fefc91575e0

See more details on using hashes here.

Supported by

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