Metadata-Version: 2.4
Name: dumont
Version: 0.1.0
Summary: Excel file generation tool with pivot tables
Author: Dumont Developer
License: MIT
Project-URL: Homepage, https://github.com/example/dumont
Project-URL: Repository, https://github.com/example/dumont
Keywords: excel,pivot,pandas,xlwings,cli
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: pandas>=1.5.0
Requires-Dist: xlsxwriter>=3.0.0
Requires-Dist: click>=8.0.0
Requires-Dist: openpyxl>=3.0.0
Provides-Extra: xlwings
Requires-Dist: xlwings>=0.30.0; extra == "xlwings"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"

# Dumont

Excel file generation tool with data sheets and pivot tables.

## Installation

```bash
# Install with pip
pip install -e .

# Or install with xlwings support
pip install -e ".[xlwings]"
```

## CLI Usage

### Generate Excel with sample data

```bash
dumont generate -o sales_report.xlsx
```

### Generate from CSV/Excel input

```bash
dumont generate -i data.csv -o report.xlsx
```

### Customize pivot table

```bash
dumont generate -o report.xlsx \
    --pivot-values Revenue \
    --pivot-index Category \
    --pivot-columns Region \
    --aggfunc sum
```

### Use xlwings engine (requires Excel installed)

```bash
dumont generate -o report.xlsx --engine xlwings
```

### Preview sample data

```bash
dumont sample --rows 20
```

### Preview Excel file contents

```bash
dumont preview report.xlsx --sheet Data --rows 10
```

### Get file information

```bash
dumont info report.xlsx
```

## Python API Usage

```python
from dumont import create_excel_with_pivot, generate_sample_data
import pandas as pd

# Generate with sample data
create_excel_with_pivot(
    output_path="report.xlsx",
    use_sample_data=True,
    sample_rows=200,
)

# Use your own DataFrame
df = pd.read_csv("my_data.csv")
create_excel_with_pivot(
    output_path="report.xlsx",
    df=df,
    pivot_values="Sales",
    pivot_index="Product",
    pivot_columns="Quarter",
    pivot_aggfunc="sum",
)

# Use xlwings for native Excel features
from dumont import create_excel_with_xlwings

create_excel_with_xlwings(
    output_path="report.xlsx",
    use_sample_data=True,
    visible=True,  # Show Excel during creation
)
```

## Output Structure

The generated Excel file contains:

1. **Data Sheet**: Raw data with auto-fitted columns
2. **Pivot Sheet**: Pivot table summarizing the data with margins/totals

## Requirements

- Python 3.8+
- pandas
- xlsxwriter
- click
- openpyxl
- xlwings (optional, for advanced Excel features)
