Observed since 20 Oct, 15:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Colorful and customizable logging module for CLI applications.
tuning is a colorful and customizable dual-logging module for CLI applications. Emojis included 😉.
The idea is simple, display human-readable and colorful terminal logs, while keeping file logs detailed and sober.
It builds on stdlib logging and Rich, so you can use it as usual:
logger.my_custom_lvl()bold italic white on redEasy to use
basicConfig(), including rotating logs.Fully customizable
TRACE and SUCCESS)timestamp and path (caller file).logger.prompt(...)banner(...)Optional extras are available for CLI and TUI integrations, but
tuningdoes not wrap Typer or Textual.
pip install 2ning
For local development:
git clone https://github.com/octanima-labs/tuning
cd tuning
pip install -e ".[dev,cli,tui,docs]"
import tuning
logger = tuning.getLogger(__name__)
logger.info("application started")
logger.success("everything looks good")
name = logger.prompt("Your name?")
logger.info("hello %s", name)
This zero-config path installs packaged console defaults lazily on first use. Configure logging explicitly when you want predictable startup behavior:
import tuning
tuning.basicConfig(
level="INFO",
show_time=True,
datefmt=tuning.ISO_FORMAT,
)
logger = tuning.getLogger(__name__)
logger.info("configured output")
Use show_level=False when console output should contain only the message.
Add a runtime-only custom level:
tuning.addLevel(7, "MY_CUSTOM_LEVEL", symbol="MC", style="bright_blue")
logger = tuning.getLogger(__name__)
logger.my_custom_level("custom runtime output")
Print a custom app banner from banners.txt:
import tuning
tuning.banner()
With no path, banner() searches upward from the calling file for
banners.txt. Each section starts with a strict lowercase marker such as
### ansi_shadow.
Customize rendering with Rich styles:
tuning.banner(
name="ansi_shadow",
border_style="bright_cyan",
text_style="bold bright_magenta",
background_style="on black",
padding=(0, 2),
box="HEAVY",
)
Use a file handler:
tuning.basicConfig(filename="app.log", level="INFO")
Use rotating file logs:
tuning.basicConfig(
filename="app.log",
max_bytes="10 MB",
backup_count=5,
)
Export a full starter YAML config into your project:
import tuning
config_path = tuning.export()
Load YAML configuration:
tuning.basicConfigFromYaml("tuning.yml", force=True)
Common contributor commands and documentation build steps live in Development.
The short version:
./.venv/bin/python -m pytest
./.venv/bin/ruff check .
./.venv/bin/mypy tuning tests
./.venv/bin/sphinx-build -W -b dirhtml docs site
tuning is distributed under the MIT license.
We 💙 CLI
Download counts and popularity will appear here as the collector receives them.
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 1.0.0 | 7 May 2026 | 20 |
This describes our collected data; it is not a security assessment.
Observed since 20 Oct, 15:26 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:7b3193754d8c6aa64757930dccbd4541ad60d9195ec269845ca0cd9fc195ddf1