ValueUUId

class dsviper.ValueUUId(initial_value=None)

Bases: Value

A value of type uuid.

Use the static factory method create(…) or try_parse(…).

Or use Value.create(Type.UUID [, initial_value]).

INVALID = 00000000-0000-0000-0000-000000000000
static cast(value: Value | _OutputValues) → ValueUUId

Return value as a uuid, or raise if it is not one.

copy() → ValueUUId

Return a deep copy.

static create(uuid_string: str | ValueUUId | None = None) → ValueUUId

Return a uuid from uuid_string if specified otherwise a generated one.

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

Return the value written out, then its type, as <value>:<type>.

namespace qualifies the type name; representation() gives the value alone.

encoded() → str

Return a Python str.

hash() → int

Return the hash value.

is_valid() → bool

Return True if the value is not INVALID.

representation() → str

Return the value written out: the uuid in its canonical 8-4-4-4-12 form.

static try_parse(string: str) → ValueUUId | None

Return string parsed as a uuid, or None if it does not parse.

type() → Type

Return the Type this value is an instance of.

type_code() → str

Return the code naming this kind of value, such as “int32”, “struct” or “vector”.