xotl.tools.values.ids
– unique identifiers at different contexts¶
Utilities to obtain identifiers that are unique at different contexts.
Contexts could be global, host local or application local. All standard
uuid
tools are included in this one: UUID
, uuid1()
,
uuid3()
, uuid4()
, uuid5()
, getnode()
and standard
UUIDs constants NAMESPACE_DNS
, NAMESPACE_URL
, NAMESPACE_OID
and
NAMESPACE_X500
.
This module also contains:
str_uuid()
: Return a string with a GUID representation, random if the argument is True, or a host ID if not.
New in version 1.7.0.
Deprecated since version 2.1.0.
-
xotl.tools.values.ids.
str_uuid
(random=False)[source]¶ Return a “Global Unique ID” as a string.
Parameters: random – If True, a random uuid is generated (does not use host id). Deprecated since version 2.1.0: Use
uuid.uuid4()
oruuid.uuid1()
.