Metadata-Version: 2.3
Name: repen
Version: 0.1.0
Summary: Automation engine for report generation
License: MIT
Author: Aliaksandr Sharstniou
Author-email: a.sharstniou.dev@gmail.com
Requires-Python: >=3.12
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Description-Content-Type: text/markdown

# Repen

Automation Engine for Report Generation in Python

Repen is a Python library for automated report generation that follows the same philosophy as [Manim](https://github.com/3b1b/manim) but for reports. It provides a declarative way to create beautiful, reproducible reports from various data sources.

## ✨ Features

- Declarative API - Build reports using a clean, chainable API
- Smart Adapters - Automatically convert common Python objects to report components
- Multiple Outputs - HTML with themes, debug output, extensible renderers
- Rich Components - Text with markdown-like syntax, tables, metrics, figures, images
- Extensible - Easy to add new adapters, components, and renderers

## 🚀 Quick Start

Installation

``` shell
pip install repen
```

Basic Usage

``` python
import matplotlib.pyplot as plt
import pandas as pd
from repen import Report

# Create a report
report = Report(title="Sales Analysis Q4 2023")

# Add content - Repen automatically adapts different data types
report.add("# Executive Summary")
report.add("Monthly sales performance with **key metrics** and trends.")

# Add metrics
report.add(
    {
        "Revenue": ("$1.2M", "USD", "highlight"),
        "Growth": ("15.2%", None, "success"),
        "Customers": (1250, "active", "default"),
    }
)

# Add a pandas DataFrame
df = pd.DataFrame(
    {
        "Month": ["Oct", "Nov", "Dec"],
        "Sales": [350000, 420000, 430000],
        "Growth": ["12%", "20%", "2.4%"],
    }
)
report.add(df)

# Add a matplotlib figure
fig, ax = plt.subplots()
ax.plot([1, 2, 3], [350, 420, 430])
ax.set_xlabel("Month")
ax.set_ylabel("Sales (K)")
ax.set_title("Sales Trend")
report.add(fig)

# Render and save
report.save("sales_report.html")
```

