Skip to main content

Random password Generator

PyPI version Build Status

A minimal and custom random password generator.

[NOTICE] API and WEB versions are now moved to https://github.com/suryasr007/rpg-web

Usage

  • Install the package.
  • Import the package.
  • Create an instance
  • Modify the default properties. (Optional)
  • Generate the password (Default length of password 6-16 unless specified via properties).
  pip install random-password-generator
  from password_generator import PasswordGenerator

  pwo = PasswordGenerator()
  pwo.generate()

Configuration

property Description Default
minlen Minimum length of the password 6
maxlen Maximum length of the password 16
minuchars Minimum upper case characters required in password 1
minlchars Minimum lower case characters required in password 1
minnumbers Minimum numbers required in password 1
minschars Minimum special characters in the password 1

Update V2.2.0

Application is now minimal(No dependencies). The API and WEB version are moved to https://github.com/suryasr007/rpg-web

Update V2.1.0

Application uses secrets module instead of random module on Python environments above 3.6.

Update V1.1.0

From version 1.1.0, Characters can be excluded from the required password by setting the properties on PasswordGenerator object

example:

  pwo = PasswordGenerator()

  pwo.excludeuchars = "ABCDEFTUVWXY" # (Optional)
  pwo.excludelchars = "abcdefghijkl" # (Optional)
  pwo.excludenumbers = "012345" # (Optional)
  pwo.excludeschars = "!$%^" # (Optional)

Generate a custom password

  pwo = PasswordGenerator()

  # All properties are optional
  pwo.minlen = 30 # (Optional)
  pwo.maxlen = 30 # (Optional)
  pwo.minuchars = 2 # (Optional)
  pwo.minlchars = 3 # (Optional)
  pwo.minnumbers = 1 # (Optional)
  pwo.minschars = 1 # (Optional)

  pwo.generate()

Generate a password from given characters

  pwo = PasswordGenerator()

  # It takes two arguments
  # required characters and length of required password
  pwo.shuffle_password('sdafasdf#@&^#&234u8', 20)

Generate Non Duplicate Password

  pwo = PasswordGenerator()

  # length of required password
  pwo.non_duplicate_password(20)

Contributions

Contributions are welcomed via PR.

License

Metadata

Release files for random-password-generator 2.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for random-password-generator 2.2.0
File Size Uploaded
random-password-generator-2.2.0.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for random-password-generator 2.2.0
File Interpreter ABI Platform
random_password_generator-2.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.1 kB

Release files / random-password-generator-2.2.0.tar.gz

Download URL random-password-generator-2.2.0.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d8a8e2c0420fdd2c096bc7948f62701cb36761aea42e59c9a504d02f0e359d43
BLAKE2b-256 checksum
How to use checksums
d6aecef95522c149cdedbcccb2f3c9b16e72d56c8445268e88cd6ce1c648f5cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.3

Release files / random_password_generator-2.2.0-py3-none-any.whl

Download URL random_password_generator-2.2.0-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
da9ce21a9b6a99dfda940596fe417a55470a2e0343fae56dea785f431780d8a9
BLAKE2b-256 checksum
How to use checksums
15f77dc48013751fd4e8b3ea034bd4f80028a157e0992e6b6a1b2d47423744c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.2.0 This release

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.1

2 release files

1.1.0

1 release file

1.0.1

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page