Complex password generator
Project description
pypwdgen
Complex pasword generator
Prerequisites
Python 3.6 minimum is required to use the secrets
module (which is recomended instead of the random
module to manipulate sensitive data).
Installation
pip install pypwdgen
Using the cli
python3 -m pypwdgen
Optional arguments
-l, --length:
Length of the password (default: 9)
-n, --number:
Number of passwords to generate (default: 1)
-c, --complexity:
Minimum number of character classes to use (default: 3)
Example
# generates 20 passwords of 10 characters
python3 -m pypwdgen -l 10 -n 20
Using in a script
You can easily use pypwdgen
to generate password inside your scripts.
Get only the password itself
from pypwdgen.core import Password
passwd_string = str(Password(20, 4)) # Please note the usage of str()
# Print password
print(f"My password is: {passwd_string}")
Get a Password object and use its properties
from pypwdgen.core import Password
passwd_object = Password(20, 4)
# Print password complexity score from object attribute
print(f"My password complexity score is: {passwd_object.complexity}")
# Print password string from object attribute
print(f"My password is: {passwd_object.password}")
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
pypwdgen-1.0.4.tar.gz
(6.1 kB
view details)
Built Distribution
File details
Details for the file pypwdgen-1.0.4.tar.gz
.
File metadata
- Download URL: pypwdgen-1.0.4.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 190340e8b5e1cc1d0e0f502c3d0252e19c2b1dd0d8b1ec6f562845eefda91f55 |
|
MD5 | c3e6d322cc9fc45601fdc6e9a750ac72 |
|
BLAKE2b-256 | 9a91b8a93e66e18af818f5e7031b9b47137a0f72ef9d57bfb1862fb1467cb70a |
File details
Details for the file pypwdgen-1.0.4-py3-none-any.whl
.
File metadata
- Download URL: pypwdgen-1.0.4-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3cbf3c55188f04b49e0ab5596503e418c4b7166df962468be94997f857ec6da |
|
MD5 | a437e34ce07dc4d7ec4c447845d61d77 |
|
BLAKE2b-256 | 4e331835cac957a1af800fe22c65362c00a3228e90e58b3f9fcdb70cd06e267c |