Skip to content
Night Brownie Night Brownie

Health

Health and readiness fastapi routers for the night-brownie app.

Classes:

Functions:

HealthModel pydantic-model

Bases: BaseModel

Response to health check requests.

Attributes:

Parameters:

  • healthy (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:

  • healthy (bool)

ReadyModel pydantic-model

Bases: BaseModel

Response to ready check requests.

Attributes:

Parameters:

  • ready (bool, default: True ) –
  • dependencies (dict[str, bool | None], default: <class 'dict'> ) –

    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)

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:

  • ready (bool)
  • dependencies (dict[str, bool | None])

healthy_check async

healthy_check() -> HealthModel

Check to see if the service is healthy.

Returns:

ready_check async

ready_check() -> ReadyModel

Check to see if the service is ready.

Returns: