vibesketch.server.documents

Document routes: create, read, edit, import, report, render, export, save.

Every write names the revision it read: If-Match on PUT of a whole document, a revision field on the smaller edits. A stale write answers 409 with the current revision, and the client re-reads (roadmap, section 3.2). Each accepted edit is recorded in the document’s provenance; a run of edits of the same kind from the same client is folded into one entry, so a drawing session does not leave hundreds.

Functions

make_router(store)

Classes

CanvasRequest(*[, actor, client])

CreateRequest(*[, actor, client, document, ...])

DocumentResponse(*, id, revision, document, ...)

DocumentSummary(*, id, revision, file, ...)

Editor(*[, actor, client])

Who is editing; recorded in the provenance.

Embed3dRequest(*, smiles[, count])

EmbedRequest(*[, actor, client, species, ...])

Which species to give 3D structures, and how many conformers each.

ImportRequest(*[, actor, client, mode, encoding])

InputsRequest(*, program, spec[, species, ...])

One writer and one specification for several species of the document.

RevisionRequest(*[, actor, client])

An edit that needs nothing but the revision it is based on.

SpeciesRequest(*[, actor, client, label, ...])

Change what the drawing cannot say about a species.

SubmitRequest(*[, actor, client, species])

One program and specification for species of the document, sent to vibe-queue.

SubmitResponse(*, id, revision, document, ...)

ViewRequest(*, species)

vibesketch.server.documents.make_router(store)
Parameters:

store (Store)

Return type:

APIRouter