Skip to main content

An example of a custom library

Project description

Password Generator

This Python script provides a function generate_pass that generates a random password with customizable length and character types.

Features

  • Customizable Length: Specify the desired length of the password.
  • Character Types:
    • Uppercase letters (A-Z)
    • Lowercase letters (a-z)
    • Numbers (0-9)
    • Special characters (!, @, #, etc.)

Installation

import mypassgen

Usage

  1. Import the generate_pass function into your Python project.
  2. Call the function with your desired parameters.

Parameters

Parameter Type Description Default
length int Length of the password Required
uppercase bool Include uppercase letters (A-Z) True
lowercase bool Include lowercase letters (a-z) True
numbers bool Include numbers (0-9) True
special bool Include special characters (!, @, #, etc.) False

Return

  • str: A randomly generated password.

Example

from mypassgen import generate_pass

# Generate a random password with all default options (length is required)
password = generate_pass(length=8,special=True,uppercase=True,lowercase=True,numbers=False)
print("Random password:", password)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

mypassgen-1.1.1-py3-none-any.whl (2.4 kB view details)

Uploaded Python 3

File details

Details for the file mypassgen-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: mypassgen-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 2.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for mypassgen-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7614d49414e0e53b05e170e08949e7443687fc8713ba9c7a9d0f7ec68184acd
MD5 a2f556c1b19c818ed75fd98422b650b6
BLAKE2b-256 f4533a7fe48c0958aa9272b6b87b4075f27b4ea7283763a915a2f5926b91be94

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