api.endpoints package#
Submodules#
api.endpoints.endpoints module#
Websocket API module.
This module contains method(s) defining application any web socket endpoint(s)
- exception api.endpoints.endpoints.InelegantKafkaShutdownWarning[source]#
Bases:
Warning
Warning to indicate issues with shutdown of kafka
- exception api.endpoints.endpoints.MultipleKafkaProducerStartWarning[source]#
Bases:
Warning
Warning to indicate attempt to start kafka producer on app with existing kafka producer.
- async api.endpoints.endpoints.close_apache_kafka_producer(fastapi_application: FastAPI)[source]#
Closes the Apache Kafka producer
- Parameters:
fastapi_application – Instance of FastAPI application to consume properties from.
- async api.endpoints.endpoints.handle_chat(websocket: WebSocket, chat_uuid: UUID)[source]#
Handle chat operations on chat with id {chat_uuid}. :param websocket: FastAPI Websocket object for websocket operations. :param chat_uuid: UUID of chat :return:
- api.endpoints.endpoints.lifespan(fastapi_application: FastAPI)[source]#
Run start up and shut down operations for the server.
Code before the yield statement gets called before running server, while code after the yield statement gets called during the closure of the server. :param fastapi_application: FastAPI app instance.
- async api.endpoints.endpoints.set_up_chat(request_json_body: SetUpChatRequestBody, session: Session = Depends(get_db))[source]#
Endpoint for setting up chat.
Creates a unique chat uuid and saves in database returning a redirect response. :return: