kd.kontext.Path

kd.kontext.Path#

class kauldron.kontext.Path(
*parts: int | float | complex | slice | str | bool | None | types.EllipsisType | tuple | kauldron.kontext.path_parser.Wildcard,
)[source]

Bases: kauldron.kontext.paths.AbstractPath

Represents a (non-glob) string path.

get_from(
context: Any,
*,
default=Ellipsis,
err_spec: bool = False,
)[source]

Extract the object from the path.

set_in(context: Any, value: Any) None[source]

Set the object in the path.

parts: tuple[int | float | complex | slice | str | bool | None | types.EllipsisType | tuple | kauldron.kontext.path_parser.Wildcard, ...]