Skip to main content

genpasswd is a package to generate random passwords.

Reason this release was yanked:

Latest versions are bug free

Project description

GenPasswd is a package to generate random and strong passwords.

Installation

PyPI

Using command-prompt

pip install genpasswd

Usage

Import the library.

from genpasswd import password, pass_gen

This will generate a random password and print it on the screen.

arg = password()
passwd = pass_gen(arg)
print(passwd)

Some other options in generating password.

Getting password length

arg = password(length=5)
passwd = pass_gen(arg)
print(passwd)

Whether the characters in passwords repeat or not

# default value of repeat is 'True'
arg = password(repeat=False)  
passwd = pass_gen(arg)
print(passwd)

Characters to ignore in passwords

# to ignore alphabets
# you can also give 'numbers', 'uppercase', 'lowercase', 'symbols' to ignore then respectively
arg = password(ignore='alphabets')
# also give random unwanted characters (eg., ignore='abc' will ignore the lowercase 'a','b','c')
passwd = pass_gen(arg)
print(passwd)

Characters to include in passwords

# to include alphabets
# you can also give 'numbers', 'uppercase', 'lowercase', 'symbols' to include then respectively
arg = password(include='alphabets')
# also give random unwanted characters (eg., include='abc' will include the lowercase 'a','b','c')
passwd = pass_gen(arg)
print(passwd)

Only characters in passwords

# to generate password only using alphabets
# you can also give 'numbers', 'uppercase', 'lowercase', 'symbols' 
# to generate password only using then respectively
# length value must be given
arg = password(only='alphabets', length=16)
# also give random unwanted characters (eg., only='abc' will create password only using the lowercase 'a','b','c')
passwd = pass_gen(arg)
print(passwd)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

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

genpasswd-1.0.1.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

genpasswd-1.0.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page