Health
Health and readiness fastapi routers for the night-brownie app.
Classes:
-
HealthModel–Response to health check requests.
-
ReadyModel–Response to ready check requests.
Functions:
-
healthy_check–Check to see if the service is healthy.
-
ready_check–Check to see if the service is ready.
HealthModel
pydantic-model
¶
Bases: BaseModel
Response to health check requests.
Attributes:
Parameters:
-
healthy(bool, default:True) –
Show JSON schema:
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
ready_check
async
¶
ready_check() -> ReadyModel