Skip to main content

Random password Generator

PyPI version Build Status

A simple and custom random password generator.
  • Generate a simple password of default length 6-16.
  • Generate a password with custom properties.
  • Generate a password from given characters.
  • Generate Non Duplicate Password.
  • Available at https://random-pg.herokuapp.com/

API (GET Request)

  • Base_url: https://random-pg.herokuapp.com
  • Generate simple password /api/generate
    • Optional Attributes can be provided as params
      eg:
       /api/generate?minlen=16  
       /api/generate?minlen=16&minlchars=5
      
  • Generate a custom password from givin characters
    • Mandatory attributes can be provided as params
      eg:
       /api/shuffle?password=sdjbfbfB&maxlen=14
      
  • Generate a non duplicate password.
    • Mandatory Attribute 'maxlen'
      eg:
       /nonduplicate?maxlen=14
      

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.1.0

Application uses secrets module instaed of random module whenever possible.

Update V2.0.1

Application is available at following link: https://random-pg.herokuapp.com/

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.shuffle_password(20)

Contributions

Contributions are welcomed via PR.

License

  • MIT

Metadata

Release files for random-password-generator 2.1.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.1.0
File Size Uploaded Provenance Actions
random-password-generator-2.1.0.tar.gz 4.8 kB Without provenance Details for random-password-generator-2.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 9.7 kB

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

Download URL random-password-generator-2.1.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9a29ee55312dd84ac6f2608cc6b6fd4ab98c6bad02c3322f229e8410dd0d34ca
BLAKE2b-256 checksum
How to use checksums
ed4cc28d701f46ec97cd8bea0a890b24a81295f8ff54abfe31c94aa0a158ef83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.4.9

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

Download URL random_password_generator-2.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c22b12b39945591ef1ace719ab2ae71203622c01a9117a82337913b96cae2b22
BLAKE2b-256 checksum
How to use checksums
6b8945dbb4fc3a999c5b2c0767756cf9e7c30c076a30953941903216499c6414
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.4.9

Security for random-password-generator 2.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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