Although both of them are using the same implementation as of python 3.8
[1], the python docs recommend using the secrets module for generating
secrets, and its usage makes it clearer for reviewers that a
cryptographically strong source of randomness is used.
Although both of them are using the same implementation as of python 3.8 [1], the python docs recommend using the secrets module for generating secrets, and its usage makes it clearer for reviewers that a cryptographically strong source of randomness is used.
[1] https://docs.python.org/3/library/random.html#random.SystemRandom