sondra.utils module¶
- sondra.utils.get_random_string(length=12, allowed_chars='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789')[source]¶
Adapted from Django. REMOVED SECRET_KEY FOR NOW
Returns a securely generated random string. The default length of 12 with the a-z, A-Z, 0-9 character set returns a 71-bit value. log_2((26+26+10)^12) =~ 71 bits
- sondra.utils.import_string(dotted_path)[source]¶
Adapted from Django.
Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed.