SettingsValue
gammaloop Class
SettingsValue()Read-only, detached view over serialized GammaLoop settings.
Member details
path
Property · read-only#path: strDot-separated location of this value within the settings tree.
kind
Property · read-only#kind: strJSON value kind: object, array, string, number, boolean, or null.
is_object
Method#is_object() -> boolReturn whether this value is an object with named children.
is_array
Method#is_array() -> boolReturn whether this value is an array with indexed children.
is_scalar
Method#is_scalar() -> boolReturn whether this value is a scalar JSON value, including null.
keys
Method#keys() -> list[str] Return this object's child keys in lexical order.
Raises
TypeErrorIf this value is not an object.
get
Method#get(path: str) -> AnyResolve a dot-separated descendant path.
An empty path returns this value. Objects become SettingsValue views, while scalar values become their ordinary Python equivalents.
Raises
KeyErrorIf the path does not exist below this value.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
path | str | — | Relative path such as |
to_dict
Method#to_dict() -> AnyConvert the complete detached value tree to ordinary Python containers and scalars.
__getattr__
Method#__getattr__(name: str) -> AnyResolve an object child by attribute name.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
name | str | — | Immediate child key to resolve. |
__dir__
Method#__dir__() -> list[str] Return object-child names in lexical order, or an empty list for other kinds.
__len__
Method#__len__() -> intReturn the number of object or array children.
__str__
Method#__str__() -> strReturn the detached settings value as pretty-printed JSON.
__repr__
Method#__repr__() -> strReturn a compact representation containing this value's path and kind.
__getitem__
Method#__getitem__(key: Any, /) -> Any Resolve a relative string path or array index.
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
key | Any | — | Descendant path for an object, or zero-based index for an array. |
View generated signature source: docs/api/python/gammaloop-python.pyi:2043