Vte.Uuid

Fields

None

Methods

class

new_from_string (str, len, fmt)

class

new_v4 ()

class

validate_string (str, len, fmt)

dup ()

equal (other)

free ()

free_to_string (fmt, len)

new_v5 (data, len)

to_string (fmt)

Details

class Vte.Uuid

An object representing an UUID.

New in version 0.78.

classmethod new_from_string(str, len, fmt)
Parameters:
Returns:

a new UUID, or None is str is not a valid UUID string representation

Return type:

Vte.Uuid or None

Creates a new UUID from its string representation str.

New in version 0.78.

classmethod new_v4()
Returns:

a new v4 UUID

Return type:

Vte.Uuid

Creates a new random UUID.

New in version 0.78.

classmethod validate_string(str, len, fmt)
Parameters:
Returns:

True iff str is a valid string representation

Return type:

bool

Checks whether str is a valid string representation of an UUID.

New in version 0.78.

dup()
Returns:

a new copy of @`self`

Return type:

Vte.Uuid

Creates a copy of self.

New in version 0.78.

equal(other)
Parameters:

other (Vte.Uuid) –

Returns:

True iff self and other are equal

Return type:

bool

Compares self and other for equality.

New in version 0.78.

free()

Frees self.

New in version 0.78.

free_to_string(fmt, len)
Parameters:
Returns:

a string representation of self

Return type:

str

Frees self and returns its string representation, see Vte.Uuid.to_string() for more information.

New in version 0.78.

new_v5(data, len)
Parameters:
  • data (str) – string data

  • len (int) – the length of data, or -1 if str is NUL terminated

Returns:

a new v5 UUID

Return type:

Vte.Uuid

Creates a new UUID for self and str.

New in version 0.78.

to_string(fmt)
Parameters:

fmt (Vte.UuidFormat) – a Vte.UuidFormat

Returns:

a string representation of self

len:

a location to store the length of the returned string, or None

Return type:

(str, len: int)

Returns the string representation of self.

New in version 0.78.