Skip to main content

GitHub Sponsors

Kajotte Studio: Terminal Colors

Python Version Status Release MIT License

Dependabot Security Policy Python Quality Check Code Quality GitHub Actions Quality

A professional, zero-dependency ANSI color encapsulation library for Python. Designed by Kajotte Studio for developers who value clean code and terminal aesthetics.

PyPI - Version GitHub License


🚀 Overview

This package provides a complete set of ANSI escape sequences for terminal text styling. It includes standard and bright variants for both foreground and background colors.

Key Features:

  • Zero Dependencies: Pure Python, no external bloat.
  • Full Palette: 16 text colors and 16 background colors.
  • Minimalist API: Simple class-based access to ANSI codes.
  • Cross-Platform: Initialized for modern terminal emulators.

📥 Installation

You can install the package using one of the following methods:

Method 1: Official Stable Release (Recommended)

pip install kajotte-studio-tools

Method 2: Latest Development Version (GitHub)

pip install git+https://github.com/Kajotte-studio/Python-colors.git

🛠 Usage

Simply import the Colors class and use f-strings to style your output.

from kajotte_tools import Colors

Foreground colors

print(f"{Colors.GREEN}Success:{Colors.RESET} Operation completed.")
print(f"{Colors.BR_CYAN}Notice:{Colors.RESET} System update available.")

Background colors

print(f"{Colors.BG_RED}{Colors.WHITE} CRITICAL ERROR {Colors.RESET}")
print(f"{Colors.BG_BR_YELLOW}{Colors.BLACK} WARNING {Colors.RESET} Check logs.")

Alternative

import kajotte_tools as kt
print(kt.Colors.GREEN + "Clean code!" + kt.Colors.RESET)

Colors Preview

Instantly visualize the full palette of 32 colors and available formatting styles in your terminal.

Colors.preview()

Terminal Tokens

Standardized status indicators for your console applications. No more manual formatting!

from kajotte_tools import Tokens

print(f"{Tokens.SUCCESS} Operation completed!")
print(f"{Tokens.ERROR} Connection failed.")
print(f"{Tokens.INFO} System update available.")
print(f"{Tokens.WARN} Low disk space.")

You can preview all available tokens using:

Tokens.list_tokens()

Visual Progress Timer

Track your long-running tasks with a built-in progress bar and real-time countdown.

from kajotte_tools import Timer

# Create a timer for a 10-second task
session = Timer("Code Optimization", 10)
session.start()

Features:

  • Dynamic Progress Bar: Visual feedback of the task's completion.
  • Auto-formatting: Professional headers and completion summaries.
  • Time Management: Shows remaining time in seconds.

Perfect for background processes, data optimization, or educational sessions.


📝 Technical Reference

Detailed implementation details and the logic behind this class structure can be found in the technical documentation on the blog:

🔗 Internal Reference: index_blog_post_44_en.html


⚖️ License & Documentation

License: MIT License.

💡 Philosophy

"Simplicity is the ultimate sophistication."

Following the Kajotte Studio principle, this library provides only what is necessary, ensuring maximum performance and zero overhead for your CLI applications and bots.


MIT License
Developed by Kajotte Studio

Release files for kajotte-studio-tools 1.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kajotte-studio-tools 1.2.2
File Size Uploaded
kajotte_studio_tools-1.2.2.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kajotte-studio-tools 1.2.2
File Interpreter ABI Platform
kajotte_studio_tools-1.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 11.6 kB

Release files / kajotte_studio_tools-1.2.2.tar.gz

Download URL kajotte_studio_tools-1.2.2.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
32b534a8775bee7e3e66e3772e4527a9634c5e1ac623ffe43b9ee2f801c57cce
BLAKE2b-256 checksum
How to use checksums
f09561fb5d6ae1da3e5f8c43656fe0bd1689ee1634e7218def86093eeea42a6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / kajotte_studio_tools-1.2.2-py3-none-any.whl

Download URL kajotte_studio_tools-1.2.2-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92dae889e796161abfcd392ffc16c125e19e7c6172a25b0be2bc3d1426fa03fd
BLAKE2b-256 checksum
How to use checksums
f984a761cc8b4be852be289f0a0e7716bdc41259f1c10dbd380f8e04b95a3737
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

1.2.2 This release

2 release files

1.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page