Skip to content
Back to top
View this page

# ValueStructure

class dsviper.ValueStructure

  Bases: `object`

  A class used to represent a value of type struct. Seamless with a Python dict[str, object].

  Or use Value.create(type_structure [, initial_value]).

  at(field_name, *, encoded: bool = True) → _OutputValues

    Return the value of the field.

  static cast(value: Value) → ValueStructure

    Return a struct or raise.

  copy() → ValueStructure

    Return a deep copy.

  description(*, namespace: NameSpace | None = None) → str

    Return the description.

  hash() → int

    Return the hash value.

  representation() → str

    Return the representation.

  set(field_name: str, value: _InputValues)

    Set the value of the field.

  type() → Type

    Return the type.

  type_code() → str

    Return the type code.

  type_structure() → TypeStructure

    Return the type struct.