vibe-sketcherDocumentation

vibesketcher.server.solid_reactions

REST routes for solid-state and surface reaction schemes (#192).

Edits are checked against the document revision and recorded; a step that does not balance without a stated open reservoir is answered with 422 and the reasons. The check route is a dry run.

Functions

router(store)

Classes

SchemeEditRequest(*[, actor, client, ...])

SchemeExampleRequest(*[, actor, client])

SchemeFigureRequest(*[, steps, style])

SchemeRemoveRequest(*[, actor, client])

StepCheckRequest(*, step[, participants])

class vibesketcher.server.solid_reactions.SchemeEditRequest(*, actor='agent', client='rest', revision, participants=<factory>, steps=<factory>, replace=False)[source]

Bases: RevisionRequest

Parameters:
participants: list[dict[str, Any]]
steps: list[dict[str, Any]]
replace: bool
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.solid_reactions.SchemeRemoveRequest(*, actor='agent', client='rest', revision, ids)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • ids (Annotated[list[str], MinLen(min_length=1), MaxLen(max_length=1500)])

ids: list[str]
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.solid_reactions.SchemeExampleRequest(*, actor='agent', client='rest', revision, name)[source]

Bases: RevisionRequest

Parameters:
  • actor (Literal['human', 'agent', 'system'])

  • client (Annotated[str, _PydanticGeneralMetadata(pattern='^[a-z0-9][a-z0-9_.:+-]{0,63}$')])

  • revision (int)

  • name (str)

name: str
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.solid_reactions.StepCheckRequest(*, step, participants=<factory>)[source]

Bases: BaseModel

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

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

step: dict[str, Any]
participants: list[dict[str, Any]]
class vibesketcher.server.solid_reactions.SchemeFigureRequest(*, steps=None, style=None)[source]

Bases: BaseModel

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

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

steps: list[str] | None
style: str | None
vibesketcher.server.solid_reactions.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter