ValueUUId

class dsviper.ValueUUId(initial_value=None)

Bases: object

A class used to represent 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) ValueUUId

Return an uuid or raise.

copy() ValueUUId

Return a deep copy.

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

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

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

Return the description.

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 representation.

static try_parse(string: str) ValueUUId | None

Return an uuid or None.

type() Type

Return the type.

type_code() str

Return the type code.