vdoc.api package

Subpackages

Submodules

vdoc.api.lifespan module

Defines the FastAPI lifespan and route loading.

vdoc.api.lifespan.routes_loader_lifespan(fastapi)

Lifespan context manager for the FastAPI app.

The order for mounting the routers is important. The frontend router must be the last one to ensure that all non-api or documentation requests are handled by the frontend.

Parameters:

fastapi (FastAPI) – The FastAPI app instance.

Yields:

None – No value is yielded.

Return type:

AsyncGenerator[None, None]

Module contents

Contains the Rest API.

vdoc.api.create_app()

Creates the FastAPI app instance.

Return type:

FastAPI

Returns:

The FastAPI app instance.