password generator
Project description
version 0.4
Password Generator
Overview
The password_generator package provides an easy way to generate random passwords using numbers, letters, and special characters. This package allows users to create secure passwords quickly and efficiently.
Installation
You can install the package using pip. Run the following command in your terminal:
pip install edimez14-password-generator-1
Usage
Once the package is installed, you can use it to generate passwords directly from the command line or by importing it into your Python script.
Command Line Usage
You can generate a password by simply running the module from the command line:
python -m password_generator
Programmatic Usage
You can also use the password_generator function programmatically in your own Python scripts. Here is an example:
from password_generator import password_generator
# Define lists for numbers, strings, and special characters
list_num = list(range(0, 10)) # List of numbers
list_str = list("abcdefghijklmnopqrstuvwxyz") # List of lowercase letters
list_char = ['!', '"', '#', '$', '%', '&', "'", '(', ')', '*', '+', ',', '-', '.', '/', ':', ';', '<', '=', '>', '?', '@', '[', ']', '^', '_', '`', '{', '|', '}', '~']
# Generate a password
generated_password = password_generator(list_num, list_str, list_char)
# Print the generated password
print("Generated Password:", generated_password)
Function Details
-
password(): Generates and prints a random password composed of numbers, lowercase letters, and special characters. This function is called when you run the module directly. -
password_generator(list_num, list_str, list_char): Accepts three lists:list_num: A list of numbers to be used in the password.list_str: A list of strings (letters) to be included in the password.list_char: A list of special characters to be included in the password.
It returns a randomly generated password.
Example
To generate a password, simply call the password() function:
from password_generator import password
# Call the password function to generate a password
password()
Error Handling
If there are any errors during the generation of numbers, characters, or passwords, the package will print an error message to help you diagnose the issue.
License
This package is licensed under the Apache 2.0 License. See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file edimez14_password_generator_1-0.6.tar.gz.
File metadata
- Download URL: edimez14_password_generator_1-0.6.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d437f32251a4596a301c3289aed1f37cad6c8cb5431a1987904b476f1e5c3a5d
|
|
| MD5 |
6b8b6165683543145609318e75512f29
|
|
| BLAKE2b-256 |
c9201e3fec6dbbda2bcaf240ec7ae6208705fb3c23f333141a38cce3d433ee53
|