vibe-sketcherDocumentation

vibesketcher.server.figures

REST routes for cyclic-topology schematics, multi-panel figures and figure math (#247).

POST /api/documents/{id}/periodic/{structure}/topology draws a periodic structure of a document on its torus (the document is not changed); POST /api/periodic/topology draws the torus of a posted AICCM convention record. POST /api/figures/panels composes posted figure SVGs into one labelled grid, POST /api/figures/math renders one figure string and GET /api/figures/math lists the supported symbol commands. POST /api/figures/diagram draws a workflow or taxonomy diagram from a vibesketcher.diagram/1 spec and GET /api/figures/diagram/schema gives the spec’s JSON schema.

Functions

router(store)

Classes

DiagramRequest(*, spec[, format, dpi])

MathRequest(*, text[, size, format, dpi])

PanelsRequest(*, panels[, options, format, dpi])

RecordTopologyRequest(*, record[, options, ...])

TopologyRequest(*, repeats[, options, ...])

class vibesketcher.server.figures.TopologyRequest(*, repeats, options=<factory>, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

repeats: tuple[int, int, int]
options: dict[str, Any]
format: Literal['svg', 'pdf', 'png']
dpi: int
class vibesketcher.server.figures.RecordTopologyRequest(*, record, options=<factory>, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

record: dict[str, Any]
options: dict[str, Any]
format: Literal['svg', 'pdf', 'png']
dpi: int
class vibesketcher.server.figures.PanelsRequest(*, panels, options=<factory>, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

panels: list[dict[str, Any]]
options: dict[str, Any]
format: Literal['svg', 'pdf', 'png']
dpi: int
class vibesketcher.server.figures.MathRequest(*, text, size=12.0, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

text: str
size: float
format: Literal['svg', 'pdf', 'png']
dpi: int
class vibesketcher.server.figures.DiagramRequest(*, spec, format='svg', dpi=300)[source]

Bases: BaseModel

Parameters:
model_config = {'extra': 'forbid'}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

spec: dict[str, Any]
format: Literal['svg', 'pdf', 'png']
dpi: int
vibesketcher.server.figures.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter