CharBox
A powerful character attribute generator for Python.
Overview
CharBox is a Python library that generates random character attributes, including names, hair colors, and eye colors. It supports multiple name origins and offers standard and fancy variations for hair and eye colors.
Latest Features
- Manager: Added three new functions to 'CharBox' class, allowing users add new hair colors, eye colors, and names.
Features
- Generate realistic or fantasy-inspired names.
- Choose names based on gender and origin (American, Japanese, Korean, German, Russian).
- Generate standard or fancy hair and eye colors.
- Translate fancy color names (ex. 'Ebony') into more recognizable formats (ex. 'Ebony' becomes 'Black').
- Simple initialization and usage.
Installation
Install CharBox via pip:
pip install charbox
Usage
Initializing the Library
Before using CharBox, you must initialize it:
import charbox
charbox.init()
Generating Names
from charbox import Name
# Generate a first name
first_name = Name.generate_first_name(gender="male", origin="Japanese")
print(first_name) # Example Output: Haruto
# Generate a last name
last_name = Name.generate_last_name(origin="American")
print(last_name) # Example Output: Smith
# Generate a full name
full_name = Name.generate_name(gender="female", origin="Russian")
print(full_name) # Example Output: Anastasia Ivanova
Adding Names (session-based)
from charbox import CharBox
CharBox.add_name(new_value="Tyrell", origin="American", is_surname=False, gender="male")
CharBox.add_name(new_value="Arkham", origin="American", is_surname=True, gender="male")
Generating Hair Colors
from charbox import HairColor
# Generate a standard hair color
hair_color = HairColor.generate_hair_color(wording="standard")
print(hair_color) # Example Output: Chestnut
# Generate a fancy hair color
fancy_hair_color = HairColor.generate_hair_color(wording="fancy")
print(fancy_hair_color) # Example Output: Sapphire
# Translate a fancy hair color to a readable format
translated_hair_color = HairColor.translate("Sapphire")
print(translated_hair_color) # Example Output: Blue
Adding Hair Colors (session-based)
from charbox import CharBox
CharBox.add_hair_color(new_value="321", wording="standard", translation="123")
Generating Eye Colors
from charbox import EyeColor
# Generate a standard eye color
eye_color = EyeColor.generate_eye_color(wording="standard")
print(eye_color) # Example Output: Green
# Generate a fancy eye color
fancy_eye_color = EyeColor.generate_eye_color(wording="fancy")
print(fancy_eye_color) # Example Output: Amethyst
# Translate a fancy eye color to a readable format
translated_eye_color = EyeColor.translate("Amethyst")
print(translated_eye_color) # Example Output: Purple
Adding Eye Colors (session-based)
from charbox import CharBox
CharBox.add_eye_color(new_value="123", wording="standard", translation="321")
License
This project is licensed under the MIT License. See LICENSE for details.
Author
Developed by Taireru LLC. Check out our other projects at https://tairerullc.com/pages/products.
Contributing
Contributions are welcome! Feel free to submit a pull request or report issues in the repository.
Support
For support, please contact us via email or visit our website.
⭐ Enjoy using CharBox? Give us a star on GitHub!
Metadata
Release files for charbox 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| charbox-0.0.5.tar.gz | 3.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| charbox-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.4 kB
Release files / charbox-0.0.5.tar.gz
| Download URL | charbox-0.0.5.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8264e9615da55e4c664f013016765e307bef6ea876dac8d0db62b454303d0fea
|
|
BLAKE2b-256 checksum How to use checksums |
aac7df0633fc767dffaaa94c4dc3a74fddd4ac3c88b28e7a68e5455f301694e2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / charbox-0.0.5-py3-none-any.whl
| Download URL | charbox-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4fec81125ca8b8882421cc8bedde90e67a6f14582143b7e544cb4ba8498ffb58
|
|
BLAKE2b-256 checksum How to use checksums |
494391c6ad58c1d085a7e03c9e31b670a8be499c227f3050deb8a3a9100bb348
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|