Skip to main content

Excel file generation tool with pivot tables and charts

Project description

Dumont

Excel file generation tool with data sheets and pivot tables.

Installation

pip install dumont

# Or install with xlwings support
pip install dumont[xlwings]

CLI Usage

Generate Excel with sample data

dumont generate -o sales_report.xlsx

Generate from CSV/Excel input

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

Customize pivot table

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

Use xlwings engine (requires Excel installed)

dumont generate -o report.xlsx --engine xlwings

Preview sample data

dumont sample --rows 20

Preview Excel file contents

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

Get file information

dumont info report.xlsx

Web UI

Dumont includes a browser-based mini Excel interface powered by sheet.js.

Start the web server

dumont serve

Then open http://127.0.0.1:8000 in your browser.

Server options

# Custom host and port
dumont serve --host 0.0.0.0 --port 3000

# Enable auto-reload for development
dumont serve --reload

Web UI Features

  • Spreadsheet Interface: Excel-like grid with cell editing and keyboard navigation (Tab, Enter, Arrow keys)
  • Data Loading: Load sample data or upload CSV/Excel files
  • Cell Editing: Click any cell to edit, use the formula bar for longer content
  • Row/Column Management: Add or delete rows and columns
  • Pivot Tables: Create pivot tables with configurable:
    • Values (column to aggregate)
    • Index (row grouping)
    • Columns (column grouping)
    • Aggregation function (sum, mean, count, min, max)
  • Export Options:
    • Download Excel using sheet.js (client-side)
    • Download Excel with pivot table using dumont backend

API Endpoints

The FastAPI server exposes the following endpoints:

Endpoint Method Description
/ GET Serve the web UI
/api/health GET Health check
/api/sample GET Get sample data as JSON
/api/upload POST Upload CSV/Excel file
/api/data POST Update data from frontend
/api/columns GET Get column info for pivot config
/api/pivot/preview POST Generate pivot table preview
/api/generate POST Generate Excel with pivot (dumont backend)

Python API Usage

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dumont-0.4.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dumont-0.4.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file dumont-0.4.0.tar.gz.

File metadata

  • Download URL: dumont-0.4.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dumont-0.4.0.tar.gz
Algorithm Hash digest
SHA256 067c5061abab91e6a886484a6c2b5d478372459313a3a4566f50390a7c38963c
MD5 404f4f563b0ed07484df67dac7e56a0e
BLAKE2b-256 bab1cf78ee7edd3bc433923fb42f67cf9a165eb10c548c432ae6c94ae3df4d5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for dumont-0.4.0.tar.gz:

Publisher: release.yml on tojlon/dumont

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dumont-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: dumont-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dumont-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8082a8ca1ce23af748160d67e437d639930e17324359aaee675caa7dfac8a58a
MD5 1a550b21998ae499bc92c7afd2a59f8f
BLAKE2b-256 f056a92651e717d2951c475259a8d879619e5967792b2aee86326835fc465d91

See more details on using hashes here.

Provenance

The following attestation bundles were made for dumont-0.4.0-py3-none-any.whl:

Publisher: release.yml on tojlon/dumont

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page