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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ruled_password_generator-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file ruled-password-generator-1.0.1.tar.gz.

File metadata

  • Download URL: ruled-password-generator-1.0.1.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ruled-password-generator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 229d69921e75eceaa474060c257696a18e14206a0340d47b0eb05b53425d7d65
MD5 c14f40fa16b4c330518fe462d27d6749
BLAKE2b-256 b1d89c2c12b395bb4025daa059397cc6b0077657326d10607fd8a31c2d27323c

See more details on using hashes here.

File details

Details for the file ruled_password_generator-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: ruled_password_generator-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for ruled_password_generator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 612a91cdbce06d977cc68a32efcc70551c3566df289490f2f4e4529bb9b5c8e3
MD5 8c546f0324bef08d598cdf7125eec529
BLAKE2b-256 fb7be36ab4d05153249af3da1602a2c34497f3d153b2640ea095f1520b89c01e

See more details on using hashes here.

Supported by

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