hubvault.server.routes.content
Content route factory for hubvault.server.
This module exposes read-only repository browsing and download endpoints, including tree listings, single-file reads, range reads, and snapshot-plan manifests used by the remote client.
The module contains:
create_content_router()- Build the/api/v1/contentrouter
create_content_router
- hubvault.server.routes.content.create_content_router(*, api=None, api_factory=None, authorizer)[source]
Build the content router for the server app.
- Parameters:
api (Optional[hubvault.api.HubVaultApi]) – Optional repository API reused by the router
api_factory (Optional[Callable[[], hubvault.api.HubVaultApi]]) – Optional zero-argument factory returning one fresh repository API per request
authorizer (hubvault.server.auth.TokenAuthorizer) – Shared token authorizer
- Returns:
Router exposing read-only content endpoints
- Return type:
fastapi.APIRouter
- Raises:
hubvault.optional.MissingOptionalDependencyError – Raised when the API extra is not installed.
TypeError – Raised when both
apiandapi_factoryare provided or when neither input is provided.