This generator makes it easy to set up a new password
Project description
Password Generator
This generator makes it easy to set up a new password
It supports creating:
- Passwords of any length.
- Any type of character can be used
- Strings with patterns can be used
This password generator contains numbers, lowercase letters, uppercase letters and special characters by default.
If you want to use a password that contains other types of characters or string patterns, please see the Table of Contents of Usage.
Compatibility
This password generator has been tested on Python 3.7, 3.8, 3.9 and 3.10.
Usage
Install the rpgen package.
pip install rpgen
The basic usage is to create a PasswordGenerator object and call its generate method.
>>> from rpgen.password_generator import PasswordGenerator
>>> PasswordGenerator().generate()
"h~'<OT9d#vI%"
You can adjust the password length by setting MIN and MAX.
>>> generator.min = 5
>>> generator.max = 5
>>> generator.generate()
'7+ZxY'
You can add new text types to type.
>>> generator.types['korean'] = CharacterType(["가", "나", "다", "라"])
>>> generator.generate()
'zN57N[3zv,라'
You can adjust the length of each type of text.
>>> generator.types['uppercase'].min = 5
>>> generator.generate()
'SR:7G0AC_(VIs\\'
CharacterType Variable
Name | Description | Type | Default |
---|---|---|---|
candidate | Character candidate list to be Generated. | list |
Constructor |
min | Minimum length of list of characters to generate. | int |
1 |
max | Maximum length of list of characters to generate. | int |
16 |
characters | List of generated characters. | list |
[] |
PasswordGenerator Variable
Name | Description | Type | Default |
---|---|---|---|
types | Character type map to be included in password. | dict |
{ |
min | Minimum length of list of password to generate. | int |
8 |
max | Maximum length of list of password to generate. | int |
16 |
Requirements
Nothing.
Contributing
- Code Static Analyzer (flake8) check should pass.
- Annotations must be applied to password_generator.py and character_type.py.
- Required to write test code.
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
Built Distribution
File details
Details for the file rpgen-0.0.3.tar.gz
.
File metadata
- Download URL: rpgen-0.0.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf67c6b545840e0533d0fa67e20c339d4c8d6f57aa0b362f0c091a2fd0000845 |
|
MD5 | ed6567cefb3ea058a74a7aa56c8380f1 |
|
BLAKE2b-256 | ec6f0391982c54e754ffee4dd5f2328de56c7ef0962450bef422afb4d06748e3 |
File details
Details for the file rpgen-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: rpgen-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fbbece44a6bb5c34489e946cf93df84bf92511a2c4b538c60f9ed22ae41d09 |
|
MD5 | ded506c5cbb5cbe8187e3fcbbb13cade |
|
BLAKE2b-256 | 199e19482891eb523398ec61691866cab93a0df37cb3f9cbf4c64888619ab06a |