Skip to main content

A beautiful, configurable colored logging utility for Python

Project description

🥝 KiwiLog

A beautiful, colorful logging utility for Python

Python Status License

Elegant • Minimal • Readable • Colorful


Overview

KiwiLog is a lightweight Python logging utility designed to make terminal output clean, colorful, and easy to read.

Instead of dealing with complex logging frameworks, KiwiLog provides simple functions for common log types.

Perfect for:

  • CLI tools
  • Scripts
  • Debugging
  • Automation
  • Bots
  • Development utilities

Available Commands / How to Use

KiwiLog provides simple, color-coded logging functions:

Command Description Example
trace(msg) Very low-level tracing kiwilog.trace("Step 1 check")
debug(msg) Debugging details kiwilog.debug("Loading configuration")
info(msg) General information kiwilog.info("Server started")
notice(msg) Important notices kiwilog.notice("Update available")
success(msg) Success messages kiwilog.success("Build completed")
waiting(msg) Waiting for action kiwilog.waiting("Awaiting input")
warn(msg) Warnings kiwilog.warn("Low disk space")
error(msg) Errors kiwilog.error("Failed to connect")
critical(msg) Fatal or critical errors kiwilog.critical("Database unavailable")

🌀 Loading Animation

Show a beautiful loading animation for long-running tasks:

# Default dots animation
with kiwilog.loading("Processing data"):
    time.sleep(3)

# Rotating box spinner
with kiwilog.loading("Uploading", animation_type="spinner"):
    time.sleep(3)

🎡 Spinners (Manual Control)

If you prefer manual control over spinners:

spinner = kiwilog.Spinner("Connecting to database", animation_type="spinner")
spinner.start()
time.sleep(2)
spinner.stop("Connected!")

📊 Progress Bars

Easily track iterative tasks:

progress = kiwilog.ProgressBar(total=100, prefix='Downloading', length=50)
for i in range(100):
    time.sleep(0.05)
    progress.update() # Automatically increments

✨ Pretty Printing

KiwiLog automatically pretty-prints dictionaries and lists:

config = {"debug": True, "timeout": 30, "users": ["Alice", "Bob"]}
kiwilog.debug(config)

⚙️ Configuration

You can configure KiwiLog via configure() or Environment Variables:

ENV Variable Description Default
KIWILOG_LEVEL Minimum log level INFO
KIWILOG_LOG_FILE Path to log file logs/bot.log
KIWILOG_FILE_LOGGING Enable file logging true
KIWILOG_SHOW_TIMESTAMP Show timestamp true
KIWILOG_SHOW_FILENAME Show filename true
KIWILOG_PRETTY Enable pretty printing true

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

kiwilog-0.2.3.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kiwilog-0.2.3-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file kiwilog-0.2.3.tar.gz.

File metadata

  • Download URL: kiwilog-0.2.3.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for kiwilog-0.2.3.tar.gz
Algorithm Hash digest
SHA256 f2878e35db077b301b8bf1a0cefbae0607368b2a908c61ffac8f3127b077782d
MD5 3bb724430dd57515cedfaa059b507fa4
BLAKE2b-256 2842d098822df5dea26b506926087c96e184af0f4ae7d9b658982d903335cd4e

See more details on using hashes here.

File details

Details for the file kiwilog-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: kiwilog-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for kiwilog-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6514df8afd78f15a9b6530b8d52ec658672a8b8168d3f91ae04ef082984edaec
MD5 7fabb1bbfeda8edab95d41989027a14e
BLAKE2b-256 18361362276bf50020b6e6528503c128a719262532872443853ca8c01072071d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page