Ultimate console logging library with gradient colors, progress bars, tables, and more
Project description
🎨 Xylogger
Ultimate console logging library with gradient colors, progress bars, tables, and more.
Installation
pip install xylogger
Quick Start
from xylogger import console
console.info("This is an info message")
console.success("Operation completed successfully")
console.warning("This is a warning")
console.error("Something went wrong")
console.section("My Section Title")
Features
🎨 Colored Logging
from xylogger import console
console.info("Information message")
console.success("Success message")
console.warning("Warning message")
console.error("Error message")
console.debug("Debug message")
console.critical("Critical message")
🌈 Gradient Text
from xylogger import console
console.gradient_print("Beautiful gradient text!", (255, 0, 0), (0, 0, 255))
console.section("Gradient Section", start_rgb=(189, 147, 249), end_rgb=(139, 233, 253))
📊 Progress Bars
from xylogger import ProgressBar
import time
with ProgressBar(total=100, description="Processing") as pb:
for i in range(100):
time.sleep(0.02)
pb.update(1)
📋 Tables
from xylogger import Table
table = Table(["Name", "Age", "City"])
table.add_row(["Alice", "25", "NYC"])
table.add_row(["Bob", "30", "LA"])
table.print()
⏱️ Timers
from xylogger import Timer
with Timer("My Operation"):
time.sleep(1)
🔄 Spinners
from xylogger import Spinner
import time
with Spinner("Loading..."):
time.sleep(2)
📁 File Logging
from xylogger import Logger, FileHandler
logger = Logger()
logger.add_handler(FileHandler("app.log"))
logger.info("This goes to console and file")
🎭 Custom Themes
from xylogger import Logger, Theme
logger = Logger(theme=Theme.NORD)
logger.info("Styled with Nord theme")
API Reference
Logger Methods
info(message)- Information messagesuccess(message)- Success messagewarning(message)- Warning messageerror(message, error=None)- Error message with optional exceptiondebug(message)- Debug messagecritical(message)- Critical messagesection(title, start_rgb, end_rgb)- Section header with gradientgradient_print(text, start_rgb, end_rgb)- Gradient colored text
Extras
ProgressBar- Animated progress barSpinner- Loading spinnerTable- Formatted table outputTimer- Execution timerPanel- Boxed content
Decorators
@log_calls- Log function calls@timer- Time function execution
License
MIT License - see LICENSE for details.
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
xylogger-1.0.0.tar.gz
(14.1 kB
view details)
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
xylogger-1.0.0-py3-none-any.whl
(14.8 kB
view details)
File details
Details for the file xylogger-1.0.0.tar.gz.
File metadata
- Download URL: xylogger-1.0.0.tar.gz
- Upload date:
- Size: 14.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e2724b9fd310b506c84abd555efbe86a8afc4cd13bdebaccdb69e48ed42dac
|
|
| MD5 |
5e0a54a5a416797d27f76b5ddb2131a0
|
|
| BLAKE2b-256 |
13c562d0dd742bba3cdf925dc7067cd5a8125f4862114aa437caeac73e246467
|
File details
Details for the file xylogger-1.0.0-py3-none-any.whl.
File metadata
- Download URL: xylogger-1.0.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03c96ccda1a05131670428db58995f6993062b14201f7402f3b4a78618496207
|
|
| MD5 |
1b1ffec86f11554883b7b887efa4e2b8
|
|
| BLAKE2b-256 |
99af6c9d0569316f8f6e31a90894fe6474538b88682d8aec2f4d969174411053
|