Lines Matching full:secrets
1 :mod:`secrets` --- Generate secure random numbers for managing secrets
4 .. module:: secrets
5 :synopsis: Generate secure random numbers for managing secrets.
13 from secrets import *
16 **Source code:** :source:`Lib/secrets.py`
20 The :mod:`secrets` module is used for generating cryptographically strong
22 authentication, security tokens, and related secrets.
24 In particular, :mod:`secrets` should be used in preference to the
36 The :mod:`secrets` module provides access to the most secure source of
61 The :mod:`secrets` module provides functions for generating secure
110 the typical use-case expected for the :mod:`secrets` module.
140 This section shows recipes and best practices for using :mod:`secrets`
148 import secrets
150 password = ''.join(secrets.choice(alphabet) for i in range(8))
168 import secrets
171 password = ''.join(secrets.choice(alphabet) for i in range(10))
182 import secrets
187 password = ' '.join(secrets.choice(words) for i in range(4))
195 import secrets
196 url = 'https://mydomain.com/reset=' + secrets.token_urlsafe()