In Python, what is a good, or the best way to generate some random text to prepend to a file(name) that I\'m saving to a server, just to make sure it does not overwrite. Tha
I personally prefer to have my text to not be only random/unique but beautiful as well, that's why I like the hashids lib, which generates nice looking random text from integers. Can installed through
pip install hashids
Snippet:
import hashids
hashids = hashids.Hashids(salt="this is my salt", )
print hashids.encode(1, 2, 3)
>>> laHquq
Short Description:
Hashids is a small open-source library that generates short, unique, non-sequential ids from numbers.