Skip to main content

A simple password generator package.

Project description

Password Generator

Overview

The Password Generator is a Python package designed to create strong, random passwords that meet modern security requirements. It supports generating passwords of customizable lengths with a mix of uppercase, lowercase, digits, and special characters. The package is easy to use and ensures flexibility while maintaining safety standards for password creation.

Features

  • Generates random, secure passwords.

  • Password length customization between 7 and 35 characters.

  • Includes uppercase, lowercase, numbers, and special characters for enhanced security.

  • Easy-to-integrate functionality for other projects.

Installation

Install the package using pip:

pip install dtech-password-generator

Usage

Here are some examples to demonstrate how to use the package:

Basic Usage

from dtech_password_generator import password

# Generate a default password
print(password())  # Example: '2?QF7WX#[k'

# Generate a password of specific length
print(password(20))  # Example: '#UI7HN31d+0\"n|wq9rh'

Handling Invalid Lengths

# Requesting a password below the minimum length
print(password(5))  # Output: 'Length must be within 7 and 40'

# Requesting a password above the maximum length
print(password(60))  # Output: 'Length must be within 7 and 40'

Assigning Passwords to Variables

# Assigning a generated password to a variable
x = password(7)
print(x)  # Example: 'BN3bz7+'

Tests

Snippet of tests

Python 3.8.10 (default, Sep 11 2024, 16:02:53) 
[GCC 9.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from password_generator import password
>>> password()
'qCcM#071H3'
>>> password(5)
'Length must be within 7 and 40'
>>> password(6)
'Length must be within 7 and 40'
>>> password(7)
'<Ku/0+7'
>>> password(7)
'/1*Nxl2'
>>> x = password(7)
>>> x
'BN3bz7+'
>>> print(x)
BN3bz7+
>>> print(password())
2?QF7WX#[k
>>> print(password(20))
#UI7HN31d+0\"n|wq9rh
>>> password(60)
'Length must be within 7 and 40'
>>> 

License

This package is licensed under the MIT License.

Contribution

Contributions are welcome! If you'd like to add features or improve the package, feel free to open a pull request or submit an issue on GitHub.

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

dtech_password_generator-1.0.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

dtech_password_generator-1.0.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file dtech_password_generator-1.0.0.tar.gz.

File metadata

  • Download URL: dtech_password_generator-1.0.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for dtech_password_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1ecef672ca105d24a2cfa5a0b0a086b7ec060078274a13bfea3e88ed800f2f80
MD5 7957c95ba8d6c2bc1ed9cf39969a8cb6
BLAKE2b-256 aaaace6d42c0854c0d9c3f050ba4d5d9f9f90df0c63885700cc7783f03e5aea0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dtech_password_generator-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for dtech_password_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc3c96580915a31821b2dbf03741f1a69a194e3b281958e63a384c71ccad15a4
MD5 e18108bef5b46178ae61e93b69ee89a3
BLAKE2b-256 376221ce6618df8e8cbeae6a382004acdef1033e47a2ffdce5efdf7b840726a6

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