base_collections
base_collections
¶
BaseDict
¶
Bases: RootModel[dict[str, T]]
flowchart TD
stochas.base_collections.BaseDict[BaseDict]
click stochas.base_collections.BaseDict href "" "stochas.base_collections.BaseDict"
Subclassed by:
__getitem__
¶
Python
__getitem__(key: str) -> T
Get an item in the dictionary with the specified key.
__setitem__
¶
Python
__setitem__(key: str, value: T) -> None
Set the value of a single key-value pair.
Source code in src/stochas/base_collections.py
__iter__
¶
__contains__
¶
keys
¶
values
¶
items
¶
update
¶
Add a new dictionary key value pair. The key cannot already exist in the dictionary.
Source code in src/stochas/base_collections.py
update_many
¶
Python
update_many(values: Iterable[T]) -> None
Add many new dictionary key value pair. The keys cannot already exist in the dictionary.
force_update
¶
Python
force_update(value: T, warn: bool = True) -> None
Forces a key-value pair into the dictionary. Overwrites existing key if it exists.
Source code in src/stochas/base_collections.py
| Python | |
|---|---|
force_update_many
¶
Forces adding many new dictionary key value pair. Overwrites existing keys if they exist.
BaseList
¶
flowchart TD
stochas.base_collections.BaseList[BaseList]
click stochas.base_collections.BaseList href "" "stochas.base_collections.BaseList"
Subclassed by: