datacatalog.identifiers.typeduuid package¶
Submodules¶
datacatalog.identifiers.typeduuid.convert module¶
datacatalog.identifiers.typeduuid.examples module¶
datacatalog.identifiers.typeduuid.schemas module¶
datacatalog.identifiers.typeduuid.typeduuid module¶
-
class
datacatalog.identifiers.typeduuid.typeduuid.
TypedCatalogUUID
(**kwargs)[source]¶ Bases:
datacatalog.identifiers.typeduuid.uuidtypes.CatalogUUID
-
datacatalog.identifiers.typeduuid.typeduuid.
binary_uuid_to_text
(binary_uuid)[source]¶ Convert binary TypeUUID to its text representation
-
datacatalog.identifiers.typeduuid.typeduuid.
catalog_uuid
(text_value, uuid_type='generic', namespace=UUID('54765aeb-44ca-374a-9a9f-eb4658383ee4'), binary=False)[source]¶ Returns a TypedUUID5 for text_value
Parameters: Returns: The new TypedUUID in string form
Return type:
-
datacatalog.identifiers.typeduuid.typeduuid.
catalog_uuid_from_v1_uuid
(v1_uuid, uuid_type='generic', binary=False)[source]¶
-
datacatalog.identifiers.typeduuid.typeduuid.
generate
(text_value=None, uuid_type=None, binary=False)[source]¶ Generate a TypedUUID of a specific type from a string
Parameters: Returns: String representation of the generated UUID
Return type:
-
datacatalog.identifiers.typeduuid.typeduuid.
get_uuidtype
(query_uuid)[source]¶ Determine the class for a UUID
Parameters: query_uuid (str/uuid.uuid) – an TypedUUID Raises: ValueError
– Raised if the query cannot be resolved to a known UUID typeReturns: The TypedUUID class for the query Return type: str
-
datacatalog.identifiers.typeduuid.typeduuid.
listify_uuid
(uuid, validate_members=True)[source]¶ Safely cast a string UUID into a list of UUIDs
-
datacatalog.identifiers.typeduuid.typeduuid.
mock
(text_value=None, uuid_type=None, binary=True)[source]¶ Generate a mock TypedUUID of a specific type from a string
Parameters: Returns: String representation of the generated TypedUUID
Return type: Note
UUID is in a different namespace and will not validate
-
datacatalog.identifiers.typeduuid.typeduuid.
random_uuid5
(binary=True)[source]¶ Generate a random TypedUUID
Returns: String representation of the random UUID Return type: str
-
datacatalog.identifiers.typeduuid.typeduuid.
text_uuid_to_binary
(text_uuid)[source]¶ Convert text TypedUUID to binary form
-
datacatalog.identifiers.typeduuid.typeduuid.
uuid_to_hashid
(uuid_string, salt='xCPJ7PKTdp8BYYb4twh9xNYD')[source]¶ Convert a UUID to a HashId to save space. Good for file path building.
-
datacatalog.identifiers.typeduuid.typeduuid.
validate
(uuid_string, permissive=False)[source]¶ Validate whether a string is a TypedUUID
Parameters: Raises: ValueError
– The passed value was not an appId and permissive was FalseReturns: Validation result
Return type:
-
datacatalog.identifiers.typeduuid.typeduuid.
validate_type
(type_string, permissive=False)[source]¶ Ensure a provided type string is valid
Parameters: - type_string (str) – String representing a known catalog type
- permissive (vool, optional) – Return False or raise Exception on failure
Returns: Whether the value is a known type
Return type: