Metadata-Version: 2.4
Name: dev-utils-jokerssd
Version: 0.4.0
Summary: Development utilities with structured logging
Author-email: Jokerssd <jokerssd@example.com>
License: MIT
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.12
Requires-Dist: aiohttp
Requires-Dist: requests
Requires-Dist: structlog>=25.5.0
Description-Content-Type: text/markdown

# Dev Utils

A collection of development utilities, starting with structured logging.

## Installation

```bash
pip install dev-utils-jokerssd
```

## Logging Utils

A powerful wrapper around `structlog` and Python's standard `logging` module to provide structured JSON logging with rotation, async writing, and easy configuration.

### Usage

```python
from dev_utils import LoggingUtils

# Basic Setup
logging_utils = LoggingUtils(
    log_file="app.log",
    log_level="INFO",
    print_output=True,
    json_formatter=True,
    binding_dict={"app_name": "my_app"}
)

logger = logging_utils.get_logger()

# Log something
logger.info("Application started", version="1.0.0")

# Exception logging
try:
    1 / 0
except ZeroDivisionError:
    logger.exception("Something went wrong")
```

### Features

-   **Structured JSON Logs**: By default, logs are formatted as JSON for easy parsing by log management tools.
-   **Async Logging**: Uses a background thread for file writing to avoid blocking the main execution path.
-   **Log Rotation**: Automatically rotates log files daily (default).
-   **Context Binding**: Bind global context variables (like `request_id` or `user_id`) to all logs.
-   **Standard API**: Compatible with standard python `logging` (mostly) and `structlog`.
