Skip to main content

Tests-CI PyPI release

Secret key generator for Django framework

Installation

pip install secret-key-generator

Usage

In your settings.py file:

from secret_key_generator import secret_key_generator

SECRET_KEY = secret_key_generator.generate()

Customize secret key

SECRET_KEY = secret_key_generator.generate(chars=your_chars_to_use_in_secret_key,
                                           file_name=your_filename,
                                           len_of_secret_key=your_length)

With chars variable the library generates secret key.

file_name is used to name a file that is going to contain the secret key.

len_of_secret_key is used to set length of secret key

Defaults

chars: abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)
file_name: .secret.txt
len_of_secret_key: 50

About the library

This library is meant to help you with the generation of secret keys in Django framework. You do not need to generate the secret keys by yourself, and you don't have to worry about keeping the key in a safe place.

How does it work?

The library randomly generates a secret key, saves it into a file, and reads the key from the file. Each time you run a Django project, the library checks if there is a file with the correct secret key. If there is, then the library reads it. If there no such file, then the library generates a new secret key and saves it into a new file.

Metadata

Release files for secret-key-generator 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for secret-key-generator 0.0.8
File Size Uploaded
secret-key-generator-0.0.8.tar.gz 3.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for secret-key-generator 0.0.8
File Interpreter ABI Platform
secret_key_generator-0.0.8-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / secret-key-generator-0.0.8.tar.gz

Download URL secret-key-generator-0.0.8.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
952be55754af6039365a84baef6309148c86d2d197f37fac52232468b8860e9a
BLAKE2b-256 checksum
How to use checksums
bc22a6c301e63cd2ef096bc761c4688468a748eeb3349ea0aaf65e3e5147397e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

Release files / secret_key_generator-0.0.8-py3-none-any.whl

Download URL secret_key_generator-0.0.8-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de677d5d9274529ad651f5113eb36d0513b548eb1d284aa8a7e20f0be7e58ce7
BLAKE2b-256 checksum
How to use checksums
7c2f25e625fe2417a9348060014d9754d6f04761f960e4c3f6ebdf56073c5563
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page