vibe-sketcherDocumentation

vibesketcher.server.cnt_composites

REST routes for representative coated and disordered CNT fibre composites (#241).

A preview reads the current document and changes nothing; applying is checked against the document revision and recorded as an edit; an applied composite has an undo route that refuses when the model changed since. Refusals in a preview are returned with applicable: false and stable codes.

Functions

router(store)

Classes

CompositePreviewRequest(*, composite)

CompositeRequest(*[, actor, client])

CompositeUndoRequest(*[, actor, client])

class vibesketcher.server.cnt_composites.CompositePreviewRequest(*, composite)[source]

Bases: BaseModel

Parameters:

composite (dict[str, Any])

model_config = {'extra': 'forbid'}

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

composite: dict[str, Any]
class vibesketcher.server.cnt_composites.CompositeRequest(*, actor='agent', client='rest', revision, composite)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • composite (dict[str, Any])

composite: dict[str, Any]
model_config = {'extra': 'forbid'}

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

class vibesketcher.server.cnt_composites.CompositeUndoRequest(*, actor='agent', client='rest', revision, structure)[source]

Bases: RevisionRequest

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

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

  • revision (int)

  • structure (str)

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

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

vibesketcher.server.cnt_composites.router(store)[source]
Parameters:

store (Store)

Return type:

APIRouter