Generate a per-site random secret
Project description
Sitesecret is a tiny library to generate and store per-site secrets.
Stop doing this:
SECRET = 'my-top-sekrit-key'
And do this instead:
import sitesecret SECRET = sitesecret.get_secret(__name__)
SECRET will be initialized with 1024 octets of random data, suitable for cryptographic applications. The data will be saved in the current directory in a file named .sitesecret-<module name>.
Subsequent calls will return the same secret value and sitesecret ensures that only a single secret is ever generated — even if multiple processes call get_secret at the same time .
0.1.1 (released 2015-12-19)
Fix Python 3 compatibility issue
0.1 (released 2015-12-18)
Initial release
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sitesecret-0.1.1.tar.gz
(1.9 kB
view details)
File details
Details for the file sitesecret-0.1.1.tar.gz
.
File metadata
- Download URL: sitesecret-0.1.1.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b3c7d8fe73255bcb4347cac87b501ad3d9f28c9345d83436c1a81cd41309cf7 |
|
MD5 | 42a702d3e46648cb8369b1534878f437 |
|
BLAKE2b-256 | 3e326599a429922fb692d57d9e5c219879b87cb3594619c194943f7dad649c56 |