Consolio
Consolio is a lightweight, dependency-free Python library that provides an elegant way to display progress updates, warnings, errors, and other status messages in the console with color-coded indicators, spinners, and progress bars.
Perfect for CLI tools that need clean, structured feedback without complex dependencies.
Installation
Consolio has no external dependencies and works out of the box.
pip install consolio
If you’re using it directly from source (e.g., cloned repository), add the src/ folder to your PYTHONPATH or sys.path:
import sys, os
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
from consolio import Consolio
Features
- ✅ Color-coded messages for info, warning, error, success, and more.
- 🔁 Built-in progress spinners (
dots,braille,default). - 📈 Context-managed progress bars.
- 🧩 Thread-safe and clean terminal rendering (no output corruption).
- ⚙️ Works gracefully in both TTY and non-TTY (plain/CI) modes.
- 🔄 Indentation helpers (
increase_indent,decrease_indent, etc.) for hierarchical output.
Basic Usage
from consolio import Consolio
console = Consolio(spinner_type='dots')
console.print("inf", "Starting process")
console.print("wip", "Loading configuration...")
console.print("wrn", "Warning: Low memory detected")
console.print("err", "Error: Invalid input detected")
console.print("cmp", "All done!")
Indentation Control
You can now manage indentation dynamically without passing it every time.
console.increase_indent()
console.print("wip", "Setting up environment...")
console.increase_indent()
console.print("inf", "Fetching dependencies...")
console.decrease_indent()
console.print("cmp", "Setup complete.")
Explicit indentation still works:
console.print(2, "inf", "Manual indentation works too.")
Spinners
Use the spinner as a context manager:
import time
with console.spinner("Working hard...", inline=True):
time.sleep(2)
console.print("cmp", "Task complete!")
Or manually start and stop it:
console.start_animate()
time.sleep(3)
console.stop_animate()
Progress Bars
import time
with console.progress(initial_percentage=0) as update:
for i in range(0, 101, 20):
time.sleep(0.3)
update(i)
console.print("cmp", "Progress complete!")
Input Handling
user = console.input("qst", "Enter your name:")
console.print("cmp", f"Hello, {user}!")
Customization
| Option | Description | Example |
|---|---|---|
spinner_type |
Type of spinner (dots, braille, default) |
Consolio(spinner_type='braille') |
no_colors |
Disable ANSI colors | Consolio(no_colors=True) |
no_animation |
Disable spinners/progress bars | Consolio(no_animation=True) |
replace=True |
Overwrite previous message line | console.print("inf", "Updating...", replace=True) |
plain() |
Force plain output (no color/animation) | console.plain() |
rich() |
Re-enable color/animation if supported | console.rich() |
Example Structure
Example scripts are located in the examples/ folder:
example_basic_usage.py— Interactive demo with spinner and progress bar.example_plain_mode.py— CI-friendly non-interactive demo.
Run them directly:
python examples/example_basic_usage.py
License
This project is licensed under the MIT License — see the LICENSE file for details.
Made with ❤️ by devcoons
Metadata
Release files for consolio 0.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| consolio-0.1.15.tar.gz | 10.4 kB | Without provenance | Details for consolio-0.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| consolio-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for consolio-0.1.15-py3-none-any.whl |
Total release size: 20.0 kB
Release files / consolio-0.1.15.tar.gz
| Download URL | consolio-0.1.15.tar.gz |
|---|---|
| Size | 10.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17d723468e4f8545d06fd8e1ae21c752549fb0e99c27c20429fd692b8b28c7aa
|
|
BLAKE2b-256 checksum How to use checksums |
20382605162816a9172fe7f46dba9fd17916978913834406f1844b3e9c5ea8ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Release files / consolio-0.1.15-py3-none-any.whl
| Download URL | consolio-0.1.15-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70910195cf61dec564e08564dc02c61b733e86b82f3f37aa9783d95e88c0a158
|
|
BLAKE2b-256 checksum How to use checksums |
4ea8e089e0d5a112a9a3f9b8da77eeda269ad939ea75962df0d6ac4efbe22144
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.23
|
Security for consolio 0.1.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.