Skip to main content

Upsurge

A Python library for creating multi-format reports with support for sections, text, images, plots, tables, and multiple pages with internal links.

Features

  • Multi-page Reports: Create reports with multiple pages and navigation
  • Rich Content: Support for text, images, matplotlib plots, and pandas tables
  • Multiple Formats: Export to Markdown, HTML, and PDF
  • Internal Linking: Link between pages within your report
  • Customizable: Extensible design with custom CSS support

Installation

pip install upsurge

For development:

pip install upsurge[dev]

Quick Start

from upsurge import Report, Page, Text, Section
from upsurge.publishers import HTMLPublisher

# Create a report
report = Report(
    title="My Report",
    author="John Doe",
    description="A sample report"
)

# Add a page
page = Page(
    id="introduction",
    title="Introduction"
)

# Add content
page.add_content(Text(content="Welcome to my report!"))

# Add sections
section = Section(title="Background", level=2)
section.add_content(Text(content="Some background information..."))
page.add_section(section)

# Add page to report
report.add_page(page)

# Export to HTML
publisher = HTMLPublisher()
publisher.publish(report, "my_report.html")

Working with Tables

import pandas as pd
from upsurge import Table

df = pd.DataFrame({
    "Name": ["Alice", "Bob", "Charlie"],
    "Age": [25, 30, 35],
})

table = Table(
    data=df.values.tolist(),
    headers=list(df.columns),
    caption="Employee List"
)

Working with Plots

import matplotlib.pyplot as plt
from upsurge import Plot

fig, ax = plt.subplots()
ax.plot([1, 2, 3], [1, 4, 9])

plot = Plot(
    figure=fig,
    caption="A quadratic curve"
)

Export Formats

Markdown

from upsurge.publishers import MarkdownPublisher
publisher = MarkdownPublisher()
publisher.publish(report, "report.md")

HTML

from upsurge.publishers import HTMLPublisher
publisher = HTMLPublisher()
publisher.publish(report, "report.html")

PDF

from upsurge.publishers import PDFPublisher
publisher = PDFPublisher()
publisher.publish(report, "report.pdf")

Development

Install development dependencies:

pip install upsurge[dev]

Run tests:

pytest

Run linter:

ruff check src/

Build documentation:

sphinx-build -b html docs dist/docs

License

MIT License - see LICENSE file for details.

Metadata

Release files for upsurge 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for upsurge 0.1.0
File Size Uploaded
upsurge-0.1.0.tar.gz 11.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for upsurge 0.1.0
File Interpreter ABI Platform
upsurge-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.6 kB

Release files / upsurge-0.1.0.tar.gz

Download URL upsurge-0.1.0.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
8eca558dc6e584a61d49a36959884bec178863c9c35cc8d4cace0ffde28fcb51
BLAKE2b-256 checksum
How to use checksums
0f72942c171c97fc38c1981b253960cea4fec203db320f4dbdc1524fe88f4e7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.

Transparency log

Release files / upsurge-0.1.0-py3-none-any.whl

Download URL upsurge-0.1.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e7eb2dacab7e710ed185b06864639a503ea877257be1a273f5eff569751719ae
BLAKE2b-256 checksum
How to use checksums
f9e8a1a6733b6245b3f382f1c1b459015bbee3991fcded8837b6461dbeabdea4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Mar 31, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page