Print colored text easily in Python
Project description
🎨 juniorprint
"PyPI" (https://img.shields.io/pypi/v/juniorprint.svg) "Python" (https://img.shields.io/pypi/pyversions/juniorprint.svg) "License" (https://img.shields.io/pypi/l/juniorprint.svg) "Build" (https://github.com/Tech-dax/Juniorprint/actions/workflows/publish.yml/badge.svg)
🚀 What is juniorprint?
"juniorprint" is a lightweight Python library that allows you to print colored and styled text in the terminal using a simple and readable syntax.
No need to remember ANSI escape codes anymore.
📦 Installation
Install via pip:
pip install juniorprint
⚡ Quick Start
from juniorprint import print_
print_("r_[Error] g_[Success] normal text")
🎯 How it works
You write text using this pattern:
_[your text]
Example:
print_("r_[This is red]")
🎨 Available Styles
Code| Meaning
r| Red
g| Green
y| Yellow
b| Blue
m| Magenta
c| Cyan
w| White
d| Bold
You can combine them:
print_("rd_[Bold Red Text]")
📚 Examples
🔴 Basic Colors
from juniorprint import print_
print_("r_[Error]")
print_("g_[Success]")
print_("y_[Warning]")
print_("b_[Information]")
🎨 Mixed Text
print_("r_[Error:] File not found")
print_("g_[OK:] Operation completed")
💪 Bold Text
print_("d_[Bold text]")
print_("rd_[Critical Error]")
🔥 Multiple Styles in One Line
print_("g_[OK] r_[Error] y_[Warning] b_[Info]")
🧠 Dynamic Example
name = "Alice"
status = "online"
print_(f"g_[User] {name} is {status}")
💡 Mixing Styled and Normal Text
print_("Normal text g_[green text] back to normal r_[red text]")
🛠️ Why use juniorprint?
- Simple and readable syntax
- No need to remember ANSI codes
- Lightweight and fast
- Works with standard Python
📁 Project Structure
juniorprint/
├── juniorprint/
│ ├── printer.py
│ ├── formatter.py
│ └── styles.py
├── examples/
│ └── demo.py
🌍 Source Code
GitHub repository:
https://github.com/Tech-dax/Juniorprint
📜 License
MIT License
⭐ Support
If you like this project, consider giving it a ⭐ on GitHub!
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 juniorprint-0.1.4.tar.gz.
File metadata
- Download URL: juniorprint-0.1.4.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49ccadac6379d46c0eee8079128dd23ff30c9cac1a41d5aeeb21fcee8e78dd4d
|
|
| MD5 |
c0071c346f43ed9597bfb70504299ec2
|
|
| BLAKE2b-256 |
cfef5c730fc20cbbe41d0d007e7c05b10289c5f97e8e8a12aa70efd5e422b041
|
Provenance
The following attestation bundles were made for juniorprint-0.1.4.tar.gz:
Publisher:
publish.yml on Tech-dax/Juniorprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniorprint-0.1.4.tar.gz -
Subject digest:
49ccadac6379d46c0eee8079128dd23ff30c9cac1a41d5aeeb21fcee8e78dd4d - Sigstore transparency entry: 1123173639
- Sigstore integration time:
-
Permalink:
Tech-dax/Juniorprint@47bb594e9cbbd868e206e70ab7e46e497e629f21 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Tech-dax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47bb594e9cbbd868e206e70ab7e46e497e629f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file juniorprint-0.1.4-py3-none-any.whl.
File metadata
- Download URL: juniorprint-0.1.4-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0cea82d8169b53b99f7ff3e6b6f85ff610bdb0b69eba97c8e2a8d6aa93cf579d
|
|
| MD5 |
6d15f0aa111be07a9fef1eb59dd0dc63
|
|
| BLAKE2b-256 |
f41e72e1169fad15f94ee31b2238c95858725f600742d4ff73c331b2035145c6
|
Provenance
The following attestation bundles were made for juniorprint-0.1.4-py3-none-any.whl:
Publisher:
publish.yml on Tech-dax/Juniorprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
juniorprint-0.1.4-py3-none-any.whl -
Subject digest:
0cea82d8169b53b99f7ff3e6b6f85ff610bdb0b69eba97c8e2a8d6aa93cf579d - Sigstore transparency entry: 1123173683
- Sigstore integration time:
-
Permalink:
Tech-dax/Juniorprint@47bb594e9cbbd868e206e70ab7e46e497e629f21 -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/Tech-dax
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@47bb594e9cbbd868e206e70ab7e46e497e629f21 -
Trigger Event:
push
-
Statement type: