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.
Project description
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.
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 complex color names into readable formats.
- 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
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
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
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.vercel.app/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!
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
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 charbox-0.0.2.tar.gz.
File metadata
- Download URL: charbox-0.0.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
239da8e8a6ea1844dab97956195cc454a31465d24ee8d6c889bfdab4177f1ea4
|
|
| MD5 |
1109c59e6b230aa81516b4db54398fe0
|
|
| BLAKE2b-256 |
fb9a3bb223df449fd332e7a1d60d1c70daaf9300b673e0a95e1469316a2f6304
|
File details
Details for the file charbox-0.0.2-py3-none-any.whl.
File metadata
- Download URL: charbox-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f42524479ab2fcfab6218a24ab09191761a287e95c1187f84f75d7cc6a681afc
|
|
| MD5 |
580aff6f64d438437020f26152d56e42
|
|
| BLAKE2b-256 |
01486721d82ff4b6266d2a573aaf56da77f5b92ee45ae4f0c39099414e3c6ca5
|