Skip to main content

Password generator with customizable rules.

Project description

Ruled-Password-Generator

GitHub Workflow Status GitHub release (latest SemVer) PyPI - Python Version GitHub

A password generator with customizable rules.

  • Generate a password of the given length.
  • Generate a password from given letters.
  • Generate non duplicate passwords.

Install

pip install ruled-passwd-generator

Usage (Example)

Generate a password with 12 letters which have non-duplicate letters

from ruled_password_generator import PasswordGenerator

pwg = PasswordGenerator(12, uniques=-1)
password = pwg.generate()

Generate a password with 10 to 16 letters which have at least 9 non-duplicate letters

pwg = PasswordGenerator(10, 16, uniques=9)
password = pwg.generate()

Generate a password with 10 letters which have given letters

  • Password has at least 3 letters in 'ABCDEF'.
  • Password has at least 4 letters in '123456789'.
  • Password has at least 1 letters in '-'.
rules = {'ABCDEF': 3, '123456789': 4, '-': 1}
pwg = PasswordGenerator(10, rules=rules)
password = pwg.generate()

If no rules are given, the default rules are following:

Generate 20 unique passwords

passwords = pwg.bulk_generate(20, unique=True)

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

ruled-password-generator-1.0.1.tar.gz (3.6 kB view hashes)

Uploaded Source

Built Distribution

ruled_password_generator-1.0.1-py3-none-any.whl (4.2 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