kpass is a simple password generator based on full name, age, and birthdate.
Project description
kpass
kpass is a Python library that:
- Generates hundreds (or thousands) of password combinations based on a person’s full name, age, and date of birth.
- Applies “leet”-style substitutions (e.g., A → 4, S → $, E → 3).
- Calculates password strength according to length, digit presence, special characters, mixed case, and absence of simple numeric sequences.
- Automatically saves generated passwords to a
.txtfile with progress bars powered by therichlibrary.
📦 Installation
pip install kpass-gen
🚀 Example Usage
1. Generating Passwords
from kpass import generator
# Generate hundreds of password combinations based on personal data
generator(
name="Johnny Silverhand",
age="34",
birth_date="16/11/1988"
)
This will create a file named
pass_generated.txt(in the default or specified folder) containing all valid passwords between 6 and 18 characters, with a progress bar shown during generation.
2. Applying Leet-Style Substitutions
from kpass import aplly_ciphers
original = "Panam Palmer"
leet = aplly_ciphers(original)
print(leet) # → "|D4|\|4/\/\ |D41/\/\312" (example)
3. Saving Passwords Manually
If you already have a list of passwords and only want to save them:
from kpass import save_to_txt
passwords = ["2077!", "Johnny34@", "V24!23"]
save_to_txt(passwords, file_name="my_passwords.txt")
4. Checking Password Strength
from kpass import verify
# Returns a numeric score (0–6)
score = verify(password="J4ckw$$l190s", want_verdict=False)
print(score) # → 6
# Returns a hashtag verdict
label = verify(password="J4ckw$$l190s", want_verdict=True)
print(label) # → "#very_strong"
| Score | Verdict | Description |
|---|---|---|
| 0 | #very_weak | Very weak |
| 1–2 | #weak | Weak |
| 3 | #mean | Average |
| 4 | #good | Good |
| 5 | #strong | Strong |
| 6 | #very_strong | Very strong |
🔧 API Reference
generator(
name: str,
age: str,
birth_date: str
) -> None
- Generates and saves password combinations automatically to
pass_generated.txt.
aplly_ciphers(
text: str
) -> str
- Transforms the input text using leet-style substitutions defined in the internal dictionary.
save_to_txt(
passwords: list[str],
file_name: str = "pass_generated.txt"
) -> None
- Saves the list of passwords to a text file, displaying a progress bar in the terminal.
verify(
password: str,
want_verdict: bool = True
) -> int | str
- Evaluates the strength of a password: returns a numeric score (0–6) or, if
want_verdict=True, the corresponding hashtag verdict.
✅ Requirements
- Python 3.6 or higher
rich
📄 License
This project is licensed under the MIT License.
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
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 kpass_gen-0.2.1.tar.gz.
File metadata
- Download URL: kpass_gen-0.2.1.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
916205a1b7c052baaec9cd03e60455178a2fb5661462b42dbdf2354e02a05ea5
|
|
| MD5 |
edb98217d8130907cfb577af8b17a2bc
|
|
| BLAKE2b-256 |
f68149396709d69a1c621480f79266ef3348f6031a7ab85eab324c2051341e09
|
File details
Details for the file kpass_gen-0.2.1-py3-none-any.whl.
File metadata
- Download URL: kpass_gen-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
020ffa5b34729411d69b8f7dcb2ae59651b633110edade36781c04b45760cca3
|
|
| MD5 |
116f0ea1a9835919fa5286bf1bc3786a
|
|
| BLAKE2b-256 |
1e538117c273fa696746ceefd8e6f5af34181933396de991d6287c582323082a
|