bovid.server module¶
- class bovid.server.BovidServerApp¶
Bases:
ServerApp[BovidServerAppConfig]Bovid server application.
- starlette_app: Starlette¶
- config: BovidServerAppConfig¶
- api: ExternalAPI[BovidServerAppConfig]¶
- static_state: StaticServerState[BovidServerAppConfig]¶
- state: BovidServerState¶
- __init__(config, api)¶
Set up the application.
This configures the ASGI application, attach configuration state, and automatically inject the endpoint for the OpenAPI schema.
- Parameters:
config (BovidServerAppConfig) – Configuration for the server application.
api (ExternalAPI[BovidServerAppConfig]) – Instance of an API for the server.
- Return type:
None
- class bovid.server.AppConfigHTTPEndpoint¶
Bases:
AnnotatedHTTPEndpointThe application’s environment configuration endpoint.
Will show information about the current configuration state of the API.
- GET_RESPONSES: ResponseSpec = {200: ResponseBodySpec(datatype=<class 'bovid.config.config.BovidServerAppConfig'>, media_types=frozenset({<MediaType.json: 'application/json'>}), description='OK')}¶
- async get(request)¶
- Parameters:
self (AnnotatedHTTPEndpoint)
request (Request)
- Return type:
JSONSerializedResponse