Skip to main content

Simple and custom random password generator for python

Project description

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

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

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

random-password-generator-2.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file random-password-generator-2.0.1.tar.gz.

File metadata

  • Download URL: random-password-generator-2.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for random-password-generator-2.0.1.tar.gz
Algorithm Hash digest
SHA256 7c495c6114a5cfc36bea9210c4036f7a1bad77d798132974cac3f6299797c6b0
MD5 a2598e5ae958e502c96d27276b0bded4
BLAKE2b-256 b57a0eedbcf61d35cd5d5dea5c5fd1c4f0906c0fc7642c99b4aa4fe23ef7e5e6

See more details on using hashes here.

File details

Details for the file random_password_generator-2.0.1-py3-none-any.whl.

File metadata

  • Download URL: random_password_generator-2.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.7

File hashes

Hashes for random_password_generator-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 978a00f3fc001178ee9585be9ff3ee87927e13dd94e919186aeb9b434d6c7c92
MD5 5e275539a1948b9e54b7766340713b89
BLAKE2b-256 2ed7a87edfda32c050cb88344199e7a7af3087e90ce0358e610f708ad268fac9

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