PyDocs

Nav

Cryptographic Services

token_urlsafe

secrets

function (source)
  • token_urlsafe(nbytes=None)
Return a random URL-safe text string, in Base64 encoding.

The string has *nbytes* random bytes.  If *nbytes* is ``None``
or not supplied, a reasonable default is used.

>>> token_urlsafe(16)  #doctest:+SKIP
'Drmhze6EPcv0fN_81Bj-nA'
1 Example
>>> token_urlsafe(16)
'Drmhze6EPcv0fN_81Bj-nA'
from the Python docs
See Also
No see-alsos for secrets/token_urlsafe
0 Notes
No notes for token_urlsafe