vdoc.api package
Subpackages
Module contents
Contains the Rest API.
- vdoc.api.serve_sphinx_objects_inventory(project_name, version)
Serves the objects.inv sphinx file for intersphinx mappings.
- Parameters:
project_name (
str
) – The requested project name.version (
str
) – The requested project version.
- Returns:
The objects.inv file.
- Return type:
FileResponse
- vdoc.api.serve_ui_and_assets(file_path)
Serves the web UI and the static assets (JS bundles, …) as a last fallback for all non-matched requests.
- Parameters:
file_path (str) – The requested file path.
- Returns:
The requested asset file if existing, otherwise the index.html.
- Return type:
FileResponse
- async vdoc.api.unicorn_exception_handler(_, exc)
Catches all
VDocException
exceptions and returns them as properly formatted JSONResponse.- Parameters:
exc (
VDocException
) – The catched exception.- Return type:
JSONResponse
- Returns:
The exception as formatted JSONResponse.