Simple and custom random password generator for python
Project description
Random password Generator
A simple and custom random password generator.
- Generate a simple password of default length 6-16.
- Generate a password with custom properties.
- Generate a password from given characters.
- Generate Non Duplicate Password.
- Available at https://random-pg.herokuapp.com/
API (GET Request)
- Base_url: https://random-pg.herokuapp.com
- Generate simple password
/api/generate
- Optional Attributes can be provided as params
eg:/api/generate?minlen=16 /api/generate?minlen=16&minlchars=5
- Optional Attributes can be provided as params
- Generate a custom password from givin characters
- Mandatory attributes can be provided as params
eg:/api/shuffle?password=sdjbfbfB&maxlen=14
- Mandatory attributes can be provided as params
- Generate a non duplicate password.
- Mandatory Attribute 'maxlen'
eg:/nonduplicate?maxlen=14
- Mandatory Attribute 'maxlen'
Usage
- Install the package.
- Import the package.
- Create an instance
- Modify the default properties. (Optional)
- Generate the password (Default length of password 6-16 unless specified via properties).
pip install random-password-generator
from password_generator import PasswordGenerator
pwo = PasswordGenerator()
pwo.generate()
Configuration
property | Description | Default |
---|---|---|
minlen | Minimum length of the password | 6 |
maxlen | Maximum length of the password | 16 |
minuchars | Minimum upper case characters required in password | 1 |
minlchars | Minimum lower case characters required in password | 1 |
minnumbers | Minimum numbers required in password | 1 |
minschars | Minimum special characters in the password | 1 |
Update V2.1.0
Application uses secrets module instaed of random
module whenever possible.
Update V2.0.1
Application is available at following link: https://random-pg.herokuapp.com/
Update V1.1.0
From version 1.1.0, Characters can be excluded from the required password by setting the properties on PasswordGenerator object
example:
pwo = PasswordGenerator()
pwo.excludeuchars = "ABCDEFTUVWXY" # (Optional)
pwo.excludelchars = "abcdefghijkl" # (Optional)
pwo.excludenumbers = "012345" # (Optional)
pwo.excludeschars = "!$%^" # (Optional)
Generate a custom password
pwo = PasswordGenerator()
# All properties are optional
pwo.minlen = 30 # (Optional)
pwo.maxlen = 30 # (Optional)
pwo.minuchars = 2 # (Optional)
pwo.minlchars = 3 # (Optional)
pwo.minnumbers = 1 # (Optional)
pwo.minschars = 1 # (Optional)
pwo.generate()
Generate a password from given characters
pwo = PasswordGenerator()
# It takes two arguments
# required characters and length of required password
pwo.shuffle_password('sdafasdf#@&^#&234u8', 20)
Generate Non Duplicate Password
pwo = PasswordGenerator()
# length of required password
pwo.non_duplicate_password(20)
Contributions
Contributions are welcomed via PR.
License
Project details
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 random-password-generator-2.1.2.tar.gz
.
File metadata
- Download URL: random-password-generator-2.1.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.3 Darwin/20.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 787cb13f53efe5d681f726012604dcb5017020aa0b044553e5a402f7886aded1 |
|
MD5 | 318772eaf9268dd1560b2141b0c7a669 |
|
BLAKE2b-256 | eb03319cf8346ddceb7514f64e1a90f0aa9ca946596e14109fdaf5f388c9fb1d |
File details
Details for the file random_password_generator-2.1.2-py3-none-any.whl
.
File metadata
- Download URL: random_password_generator-2.1.2-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.7.3 Darwin/20.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5006122c00d664e56a481bd4e10add6bf3d971b3f8ca7a1093e2e480eab87cb |
|
MD5 | f6a7241291f72678e3a620381fd052d1 |
|
BLAKE2b-256 | c715e0133ac45f00e64ab8991797e81a9031b5ac87bde7fc38b75781b7410e67 |