I need to generate unique (and unguessable) ids for my app, so the obvious choice is to use uuids, as they are designed exactly for that need.
However, I’m wondering how using
secrets.token_urlsafe() method would differ for this purpose?
token_urlsafe as efficient as
uuid4 to avoid a potential collision when generating a key?
And if yes, are there any reason to keep using uuids?
Source: Python-3x Questions