betty.indicator.selector module¶
Data selectors.
- final class betty.indicator.selector.Attr¶
-
An attribute selector.
- class betty.indicator.selector.Element¶
-
An aggregate element selector.
- __init__(element: ElementT, /)¶
- property element: ElementT¶
The element.
- final class betty.indicator.selector.Index¶
-
A sequence item selector.
- final class betty.indicator.selector.Key¶
-
A mapping key selector.
- class betty.indicator.selector.Selector¶
-
Indicate and interact with aggregate data.
- final delete(data: Any, /) None¶
Delete the element for this selector.
- Raises:
SelectorError – raised if the selected element cannot be accessed.
- final get(data: Any, assertion: Pipe[Any, T] | None = None, /) T¶
Get the value for this selector.
- Raises:
SelectorError – raised if the selected element cannot be accessed.
- final set(data: Any, value: Any, /) None¶
Set the value for this selector.
- Raises:
SelectorError – raised if the selected element cannot be accessed.
- final exception betty.indicator.selector.SelectorError¶
Bases:
ValueErrorRaise when a selector cannot access its element on the given data.