app.services ============ .. py:module:: app.services .. autoapi-nested-parse:: Contains services that are available via fastapi dependency injection. Module Contents --------------- .. py:function:: use_leqo_db() -> collections.abc.AsyncGenerator[sqlalchemy.ext.asyncio.AsyncEngine] :async: Context manager that initializes the leqo database. .. py:function:: leqo_lifespan(_app: fastapi.FastAPI | None = None) -> collections.abc.AsyncGenerator[None] :async: Fastapi lifespan context manager. Initializes the database. .. py:function:: get_db_engine() -> sqlalchemy.ext.asyncio.AsyncEngine Gets the leqo database. Only available when called during leqo_lifespan. .. py:function:: get_settings() -> app.config.Settings Get environment variables from pydantic and cache them. .. py:function:: get_result_url(uuid: uuid.UUID, settings: Annotated[app.config.Settings, Depends(get_settings)]) -> str Return the full URL for a result identified by its UUID.