Skip to main content

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
{
"uppercase": CharacterType(list(string.ascii_uppercase)),
"lowercase": CharacterType(list(string.ascii_lowercase)),
"digits": CharacterType(list(string.digits)),
"special": CharacterType(list(set(string.punctuation)))
}
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rpgen-0.0.3.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

rpgen-0.0.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for rpgen-0.0.3.tar.gz
Algorithm Hash digest
SHA256 bf67c6b545840e0533d0fa67e20c339d4c8d6f57aa0b362f0c091a2fd0000845
MD5 ed6567cefb3ea058a74a7aa56c8380f1
BLAKE2b-256 ec6f0391982c54e754ffee4dd5f2328de56c7ef0962450bef422afb4d06748e3

See more details on using hashes here.

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

Hashes for rpgen-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 64fbbece44a6bb5c34489e946cf93df84bf92511a2c4b538c60f9ed22ae41d09
MD5 ded506c5cbb5cbe8187e3fcbbb13cade
BLAKE2b-256 199e19482891eb523398ec61691866cab93a0df37cb3f9cbf4c64888619ab06a

See more details on using hashes here.

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