Skip to content

Health

Health and readiness fastapi routers for the foreman app.

CLASS DESCRIPTION
HealthModel

Response to health check requests.

ReadyModel

Response to ready check requests.

FUNCTION DESCRIPTION
healthy_check

Check to see if the service is healthy.

ready_check

Check to see if the service is ready.

Classes

HealthModel pydantic-model

Bases: BaseModel

Response to health check requests.

ATTRIBUTE DESCRIPTION
PARAMETER DESCRIPTION
healthy

TYPE: bool DEFAULT: True

Show JSON schema:
{
  "description": "Response to health check requests.\n\nAttributes:\n    healthy: Am I healthy?",
  "properties": {
    "healthy": {
      "default": true,
      "title": "Healthy",
      "type": "boolean"
    }
  },
  "title": "HealthModel",
  "type": "object"
}

Fields:

ReadyModel pydantic-model

Bases: BaseModel

Response to ready check requests.

ATTRIBUTE DESCRIPTION
PARAMETER DESCRIPTION
ready

TYPE: bool DEFAULT: True

dependencies

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

TYPE: dict[str, bool | None] DEFAULT: <class 'dict'>

Show JSON schema:
{
  "description": "Response to ready check requests.\n\nAttributes:\n    ready: Am I ready?\n    dependencies: A key-value map of dependencies and their readiness status.",
  "properties": {
    "ready": {
      "default": true,
      "title": "Ready",
      "type": "boolean"
    },
    "dependencies": {
      "additionalProperties": {
        "anyOf": [
          {
            "type": "boolean"
          },
          {
            "type": "null"
          }
        ]
      },
      "title": "Dependencies",
      "type": "object"
    }
  },
  "title": "ReadyModel",
  "type": "object"
}

Fields:

Functions

healthy_check async

healthy_check() -> HealthModel

Check to see if the service is healthy.

RETURNS DESCRIPTION
HealthModel

HealthModel

ready_check async

ready_check() -> ReadyModel

Check to see if the service is ready.

RETURNS DESCRIPTION
ReadyModel

ReadyModel