Path

class dsviper.Path(path=None)

Bases: object

A class used to construct the location of a portion of a value.

Use the static factory method from_field(…), from_index(…), from_key(…), from_position(…) and from_unwrap().

const() PathConst

Return the PathConst interface.

copy() Path

Return a copy.

static decode(blob: ValueBlob, definitions: DefinitionsConst, *, stream_codec_instancing: StreamCodecInstancing | None = None) Path

Return a Path by decoding the blob with a StreamBinaryCodec if not specified.

element(index: int) Path

Append an element component and return self.

entry(key: _InputValues) Path

Append an entry component and return self.

field(name: str) Path

Append a field component and return self.

static from_element(index: int) Path

Create and return a Path with an element component at index.

static from_entry(value: _InputValues) Path

Create and return a Path with an entry component.

static from_field(name: str) Path

Create and return a Path with a field component.

static from_index(index: int) Path

Create a return a Path with an index component.

static from_key(key: _InputValues) Path

Create and return a Path with a key component.

static from_position(position: ValueUUId) Path

Create and return a Path with a position component.

static from_unwrap() Path

Create and return a Path with an unwrap component.

index(value: int) Path

Append an index component and return self.

key(value: _InputValues) Path

Append a key component and return self.

path(other: PathConst) Path

Append path components and return self.

position(value: ValueUUId) Path

Append a position component and return self.

static read(stream_reading: StreamReading, definitions: DefinitionsConst) Path

Read and return a Path.

representation() str

Return a string representation.

unwrap() Path

Append an unwrap directive component and return self.