SystemRandom class is the same as the random.SystemRandom class, that is, it provides random numbers and uses the best quality random seeding sources of the system.
choice(sequence) method also works just like the random.choice() method.
randbelow(n) function returns a random integer in the range [0, n).
randbits(k) method returns an integer with k random bits.
token_bytes([nbytes=None]) function returns a random byte string. If nbytes is not provided, a reasonable default is used; if provided, the returned string contains that many bytes.
token_hex([nbytes=None]) function returns a random text string in hex. The bytes used in the string are converted to two hex digits each.
token_urlsafe([nbytes=None]) function returns a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.