NodeBase
Sub classes¶
| Name | Children | Inherits |
|---|---|---|
| StringNode promptantic.form.nodes Free text, optionally constrained. |
||
| NumberNode promptantic.form.nodes A number; ``integer`` for whole numbers. |
||
| BooleanNode promptantic.form.nodes True or false. |
||
| NullNode promptantic.form.nodes Only ``null`` (e.g. the ``None`` member of a union that isn't just "optional"). |
||
| ChoiceNode promptantic.form.nodes One of a fixed set of values (``enum``, ``const``, or ``oneOf`` of titled consts). |
||
| AnyNode promptantic.form.nodes Anything (an empty schema): entered as JSON. |
||
| ArrayNode promptantic.form.nodes A list of items of one kind. |
||
| TupleNode promptantic.form.nodes A fixed sequence of positions, each of its own kind (``prefixItems``). |
||
| ObjectNode promptantic.form.nodes Named fields, plus optionally free keys (``additionalProperties`` with a schema). |
||
| UnionNode promptantic.form.nodes One of several alternatives (``anyOf`` / ``oneOf`` / several types). |
🛈 DocStrings¶
Common to all nodes.
Source code in src/promptantic/form/nodes.py
nullable
class-attribute
instance-attribute
¶
null is allowed besides the node's own kind.