__init__.py 349 B

12345678910111213
  1. import string
  2. import random
  3. def uniq_string_generator(size=6, chars=string.ascii_lowercase + string.digits):
  4. return lambda: ''.join(random.choice(chars) for _ in range(size))
  5. gen4 = uniq_string_generator(4)
  6. gen8 = uniq_string_generator(8)
  7. gen16 = uniq_string_generator(16)
  8. gen32 = uniq_string_generator(32)
  9. gen64 = uniq_string_generator(64)