hubvault.server.routes.history
History route factory for hubvault.server.
This module exposes read-only commit-history and reflog listings over HTTP.
The module contains:
create_history_router()- Build the/api/v1/historyrouter
create_history_router
- hubvault.server.routes.history.create_history_router(*, api=None, api_factory=None, authorizer)[source]
Build the history 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 history 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.