is_uid()

audeer.is_uid(uid)[source]

Check if string is a unique identifier.

Unique identifiers can be generated with audeer.uid().

Parameters

uid (str) – string

Return type

bool

Returns

True if string is a unique identifier

Examples

>>> is_uid("626f68e6-d336-70b9-e753-ed9fad855840")
True
>>> is_uid("ad855840")
True
>>> is_uid("not a unique identifier")
False