I am trying to compute 8-character short unique random filenames for, let\'s say, thousands of files without probable name collision. Is this method safe enough?
You can try the shortuuid library.
Install with : pip install shortuuid
pip install shortuuid
Then it is as simple as :
> import shortuuid > shortuuid.uuid() 'vytxeTZskVKR7C7WgdSP3d'