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 passgen
Usage
- Import the
generate_passfunction into your Python project. - 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 passgen import generate_pass
# Generate a password with default settings
password = generate_pass(length=12)
print(password)
# Generate a password with custom settings
custom_password = generate_pass(length=16, uppercase=True, lowercase=True, numbers=False, special=True)
print(custom_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 Distribution
mypassgen-1.0.0.tar.gz
(2.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mypassgen-1.0.0.tar.gz.
File metadata
- Download URL: mypassgen-1.0.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e8927d604f8db8f427bc7fb2a9ca2efdc13499c09375953b7e6ac9f8e5e5dbf
|
|
| MD5 |
81de6fdc2faf83d006cbfd5296250ac0
|
|
| BLAKE2b-256 |
e8652d9a7533877f76df09f95ff3ed30dc29ba56be9edf6bdfd5c2d3e544b1a8
|
File details
Details for the file mypassgen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: mypassgen-1.0.0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc4a7bb0fd3d48f49e3e8e636e34ce28ff36454b141944bcffebbdcab97b7b50
|
|
| MD5 |
c7f49405ee03b34c4803d4c325274b8f
|
|
| BLAKE2b-256 |
d033b42f70d1b7e6071e4ec54ba2b87a5ae69e03e984e67768120897fadac64d
|