designspace.CodeDomain#
- class designspace.CodeDomain(signature: Any, description: str = '', constraints: Any = None, examples: Any = None, validators: Any = None)#
Bases:
objectFreeform source code, declared by .code().
Values have the shape {“source”: <str>}. Always non-generative: there is no sampler form, because writing code is out of scope.
- signature#
The Signature the source must implement.
- Type:
Any
- description#
What the code should do, in prose. Declared metadata for a consumer’s own backend; never interpreted.
- Type:
- constraints#
Additional requirements, in prose. Declared metadata.
- Type:
Any
- examples#
Example implementations or input/output pairs. Declared metadata.
- Type:
Any
- validators#
Checks run against the source text. Not serializable.
- Type:
Any