hubvault.server.routes.writes
Write-route factory for hubvault.server.
This module exposes the authenticated mutation endpoints used by the remote
client and frontend write flows. Upload-like operations use a two-step
commit-plan / commit protocol so callers can avoid stale preflight
results and reduce transferred bytes through exact-copy and chunk-reuse fast
paths.
The module contains:
create_writes_router()- Build the/api/v1/writerouter
content_type
form
manifest_text
payload
uploads
read
create_writes_router
- hubvault.server.routes.writes.create_writes_router(*, api=None, api_factory=None, authorizer)[source]
Build the write 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 authenticated write 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.