Skip to main content

A library for generating secure passwords

Project description

Password Generator

A Python library for generating secure passwords.

Installation

You can install the package using pip:

pip install password-generator-lib

Usage - CLI

To generate a password using the command-line interface, you can use the following command:

python password_generator.py <length> [-l] [-u] [-n] [-s] [-f] [-r] [-q <quantity>] [--no-sequential-characters]

The available options are:

  • <length>: the length of the password (required)
  • -l, --lowercase: include lowercase letters
  • -u, --uppercase: include uppercase letters
  • -n, --numbers: include numbers
  • -s, --symbols: include special symbols
  • -f, --no-first-number-or-symbol: the password cannot begin with a number or symbol
  • -r, --no-repeated-characters: the password cannot contain the same character more than once
  • -q <quantity>, --quantity <quantity>: the number of passwords to generate (default: 1)
  • --no-sequential-characters: the password cannot contain sequential characters

Example usage:

python password_generator.py 10 -l -u -n -s -f -r --no-sequential-characters

Usage - Importing the Class

You can also import the PasswordGenerator class from the password_generator module and use it in your Python code:

from password_generator import PasswordGenerator

generator = PasswordGenerator(
    length=10,
    include_lowercase=True,
    include_uppercase=True,
    include_numbers=True,
    include_special_symbols=True,
    dont_begin_with_number_or_symbol=True,
    no_repeated_characters=True,
    no_sequential_characters=True,
    quantity=1
)

passwords = generator.generate()

print(passwords)

Author

This project was created by Mahammad Salimov. You can contact me at salimovm.7@gmail.com.

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

password-generator-lib-1.0.0.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

password_generator_lib-1.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file password-generator-lib-1.0.0.tar.gz.

File metadata

  • Download URL: password-generator-lib-1.0.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.2

File hashes

Hashes for password-generator-lib-1.0.0.tar.gz
Algorithm Hash digest
SHA256 136c417c26a9003418cfa38490c7b29d31ad6e7930cda27a4fe2f2e0aa2e8ef5
MD5 5c1a7643e20f8c75718344b6cf088cb8
BLAKE2b-256 1ed6a9b69a0c147752d52f52ff09188caea35487a3e42232cf625d04c85a0795

See more details on using hashes here.

File details

Details for the file password_generator_lib-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for password_generator_lib-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7a8cca39787b4b509784ab3aa4f555d85ea4879fb65bdf2c39924c85fea707fd
MD5 4a8da5fabd221821041430f0d651f0be
BLAKE2b-256 1b7d4124e165de4df0eee1b3268658328cdaf9be9f1a9fbf65fb65b3d07f4d40

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