Skip to content

Welcome to Ezpl Documentation

PyPI Python versions Platform License

Ezpl Logo

Ezpl is a modern Python logging framework with Rich console output and loguru file logging, featuring advanced display capabilities, configuration management, and a simple typed API suitable for professional and industrial applications.

โœจ Key Features

  • โœ… Singleton Pattern: One global instance for the whole application
  • โœ… Rich Console Output: Beautiful formatting with colors, panels, tables, and progress bars
  • โœ… File Logging: Structured logs with rotation, retention, and compression
  • โœ… RichWizard: Advanced display capabilities (panels, tables, JSON, dynamic progress bars)
  • โœ… Configuration Management: JSON config, environment variables, and runtime configuration
  • โœ… CLI Tools: Command-line interface for logs, config, and statistics
  • โœ… Full Type Hints: Complete typing support for IDEs and linters
  • โœ… Robust Error Handling: Never crashes, even with problematic input

๐Ÿš€ Quick Start

Installation

pip install ezplog

Or from source:

git clone https://github.com/neuraaak/ezplog.git
cd ezplog && pip install .

Basic Usage

from ezpl import Ezpl

# Initialize
ezpl = Ezpl(log_file="app.log")
printer = ezpl.get_printer()
logger = ezpl.get_logger()

# Console output (Rich formatting)
printer.info("Information message")
printer.success("Operation completed!")
printer.warning("Warning message")

# File logging (loguru)
logger.info("Logged to file")

# Advanced features
printer.wizard.success_panel("Success", "Operation completed")
printer.wizard.table([{"Name": "Alice", "Age": 30}], title="Users")

๐Ÿ“š Documentation Structure

Section Description
Getting Started Installation, basic usage, and first steps
API Reference Complete API documentation with examples
CLI Reference Command-line interface documentation
User Guides In-depth guides and tutorials
Examples Practical examples and use cases

๐ŸŽฏ Main Components

  • Ezpl: Singleton main class for centralized logging management
  • EzPrinter (alias: Printer): Rich-based console output with pattern format
  • EzLogger (alias: Logger): loguru-based file logging with rotation support
  • RichWizard: Advanced Rich display (panels, tables, JSON, progress bars)
  • ConfigurationManager: Centralized configuration management

๐Ÿ“ฆ Core Dependencies

  • rich>=13.0.0 โ€“ Beautiful console output and formatting
  • loguru>=0.7.2 โ€“ Modern and powerful file logging
  • click>=8.0.0 โ€“ CLI framework

๐Ÿงช Testing

Comprehensive test suite with 377 tests covering unit, integration, and robustness scenarios โ€” 65% code coverage.

Metric Value
Total tests 377
Passing 377 (100%)
Coverage 65%
Test types Unit, Integration, Robustness

๐Ÿ›ก๏ธ Robustness

Ezpl is designed to never crash, even with problematic input:

  • Automatic string conversion for non-string messages
  • Robust error handling in formatters
  • Safe handling of special characters and Unicode
  • Graceful fallbacks for all error cases

๐Ÿ“ License

MIT License โ€“ See LICENSE file for details.


Ezpl โ€“ Modern, typed, robust and beautiful logging for Python. ๐Ÿš€