app.main ======== .. py:module:: app.main .. autoapi-nested-parse:: All fastapi endpoints available. Module Contents --------------- .. py:function:: post_compile(processor: Annotated[app.processing.MergingProcessor, Depends(MergingProcessor.from_compile_request)], background_tasks: fastapi.BackgroundTasks, settings: Annotated[app.config.Settings, Depends(get_settings)], engine: Annotated[sqlalchemy.ext.asyncio.AsyncEngine, Depends(get_db_engine)]) -> starlette.responses.RedirectResponse :async: Enqueue a :class:`~fastapi.background.BackgroundTasks` to process the :class:`~app.model.CompileRequest`. .. py:function:: post_enrich(processor: Annotated[app.processing.EnrichingProcessor, Depends(EnrichingProcessor.from_compile_request)], background_tasks: fastapi.BackgroundTasks, settings: Annotated[app.config.Settings, Depends(get_settings)], engine: Annotated[sqlalchemy.ext.asyncio.AsyncEngine, Depends(get_db_engine)]) -> starlette.responses.RedirectResponse :async: Enqueue a :class:`~fastapi.background.BackgroundTasks` to enrich all nodes in the :class:`~app.model.CompileRequest`. .. py:function:: post_insert(inserter: Annotated[app.processing.EnrichmentInserter, Depends(EnrichmentInserter.from_insert_request)]) -> str | starlette.responses.JSONResponse :async: Insert enrichments via :class:`~app.model.InsertRequest`. .. py:function:: get_status(uuid: uuid.UUID, engine: Annotated[sqlalchemy.ext.asyncio.AsyncEngine, Depends(get_db_engine)]) -> app.model.StatusResponse.StatusResponse :async: Fetch status of a compile request. :raises HTTPException: (Status 404) If no compile request with uuid is found .. py:function:: get_result(uuid: uuid.UUID, engine: Annotated[sqlalchemy.ext.asyncio.AsyncEngine, Depends(get_db_engine)]) -> starlette.responses.PlainTextResponse | starlette.responses.JSONResponse :async: Fetch result of a compile request. :raises HTTPException: (Status 404) If no compile request with uuid is found .. py:function:: process_compile_request(uuid: uuid.UUID, createdAt: datetime.datetime, processor: app.processing.MergingProcessor, settings: app.config.Settings, engine: sqlalchemy.ext.asyncio.AsyncEngine) -> None :async: Process the :class:`~app.model.CompileRequest`. :param uuid: ID of the compile request :param processor: Processor for this request :param settings: Settings from .env file :param engine: Database engine to use .. py:function:: process_enrich_request(uuid: uuid.UUID, createdAt: datetime.datetime, processor: app.processing.EnrichingProcessor, settings: app.config.Settings, engine: sqlalchemy.ext.asyncio.AsyncEngine) -> None :async: Enrich all nodes in the :class:`~app.model.CompileRequest`. :param uuid: ID of the compile request :param processor: Processor for this request :param settings: Settings from .env file :param engine: Database engine to use .. py:function:: post_debug_compile(processor: Annotated[app.processing.MergingProcessor, Depends(MergingProcessor.from_compile_request)]) -> str | starlette.responses.JSONResponse :async: Compiles the request to an openqasm3 program in one request. No redirects and no polling of different endpoints needed. This endpoint should only be used for debugging purposes. .. py:function:: post_debug_enrich(processor: Annotated[app.processing.EnrichingProcessor, Depends(EnrichingProcessor.from_compile_request)]) -> list[app.model.CompileRequest.ImplementationNode] | starlette.responses.JSONResponse :async: Enriches all nodes in the compile request in one request. No redirects and no polling of different endpoints needed. This endpoint should only be used for debugging purposes.