python secrets security evaluation
Did you RTFM?  It's right in the link you provided above: "The secrets module provides access to the most secure source of randomness that your operating system provides."

If you trace is back it uses os.urandom() which "... returns random bytes from an OS-specific randomness source. The returned data should be unpredictable enough for cryptographic applications, though its exact quality depends on the OS implementation. On a UNIX-like system this will query /dev/urandom, and on Windows it will use CryptGenRandom()."