Random password generator
Project description
Random Password Generator
Python package to generate random passwords.
Usage
- Install the package
pip install randompw-generator
- Import the package
from rpg import RandomPassword
- Create an instance of the RandomPassword and generate password
pw = RandomPassword()
pw.generate()
Configuration
The default length of the password is 15, it can be changed at the time of instantiation.
# It will generate a password of the length of 20
pw = RandomPassword(20)
pw.generate()
Length can also be increased by specifying the number of each type of character.
example :
pw = RandomPassword()
# Set the number of lowercase character to 10.
pw.set_lower(10)
# Set the number of lowercase character to 9.
pw.set_upper(9)
# Set the number of lowercase character to 3.
pw.set_digits(3)
# Set the number of lowercase character to 4.
pw.set_spchars(4)
# It'll generate a password contaning 10 lowercase
# 9 upppercase, 3 digits and 4 special characters.
pw.generate()
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
Close
Hashes for randompw_generator-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6dc79cbb90abb82e4632ee25b091bd3990fb4263af6a6bd9dbee80cc945cc3 |
|
MD5 | ef6d8c856fb4e4d8328e657ab1393b0b |
|
BLAKE2b-256 | dc235e89b88750aa8542d6f67f259d6de83fdc9936317ad456ad2e018937a99f |