device-manager.app.main ======================= .. py:module:: device-manager.app.main .. autoapi-nested-parse:: Main file for the device manager service. Attributes ---------- .. autoapisummary:: device-manager.app.main.app device-manager.app.main.origins Functions --------- .. autoapisummary:: device-manager.app.main.custom_http_exception_handler device-manager.app.main.validation_exception_handler device-manager.app.main.startup device-manager.app.main.readiness Module Contents --------------- .. py:data:: app .. py:data:: origins :value: ['http://localhost:8080', 'https://localhost:8443'] .. py:function:: custom_http_exception_handler(request, exc) :async: Add logging for http exceptions. https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers .. py:function:: validation_exception_handler(request, exc) :async: Add logging for fastAPI's automatic input validation exceptions. https://fastapi.tiangolo.com/tutorial/handling-errors/#reuse-fastapis-exception-handlers .. py:function:: startup() :async: Inititalize database on startup. .. py:function:: readiness() -> dict :async: Readiness health endpoint. Inspects sqlalchemy engine and check if workflow table exists. Returns ------- Status docstring Raises ------ HTTPException 500: Workflow table not found