Skip to main content

module  pixeltable.functions.uuid

Pixeltable UDFs for UUID.

udf  to_string()

Signature
@pxt.udf
to_string(u: pxt.UUID) -> pxt.String
Convert a UUID to its string representation. Parameters:
  • u (pxt.UUID): The UUID to convert.
Returns:
  • pxt.String: The string representation of the UUID, in the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
Examples: Convert the UUID column id in an existing table tbl to a string:
tbl.add_computed_column(id_string=to_string(tbl.id))

udf  uuid4()

Signature
@pxt.udf
uuid4() -> pxt.UUID
Generate a random UUID (version 4). Equivalent to uuid.uuid4().

udf  uuid7()

Signature
@pxt.udf
uuid7() -> pxt.UUID
Generate a time-based UUID. Equivalent to uuid.uuid7().
Last modified on January 29, 2026