First commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
__version__ = "1.0.0"
|
||||
|
||||
# --- package ---
|
||||
# --- guid ---
|
||||
import uuid
|
||||
import inspect
|
||||
|
||||
def create_uuid(uuid_ver):
|
||||
# hostid, sequence, timestamp
|
||||
if uuid_ver == '1':
|
||||
return uuid.uuid1()
|
||||
|
||||
# namespace, md5
|
||||
# elif uuid_ver == '3':
|
||||
# return uuid.uuid3()
|
||||
|
||||
# random
|
||||
elif uuid_ver == '4':
|
||||
return uuid.uuid4()
|
||||
|
||||
# namespace, sha-1
|
||||
# elif uuid_ver == '5':
|
||||
# return uuid.uuid5()
|
||||
|
||||
else:
|
||||
return f'{inspect.currentframe().f_code.co_name}-Not Found UUID'
|
||||
Reference in New Issue
Block a user