def id_generator(size=8, chars=string.ascii_uppercase + string.digits):
"""Generate a random id.
This function generate a random id containing uppercase and digits.
:parameter:
size : int
The id length in number of chars.
chars : strings
The elements to use to create random id.
:return: A string, the random generated id.
"""
return ''.join(random.choice(chars) for _ in range(size))
# Takes list of files as argument, put them in tar archive and return it.
评论列表
文章目录