Skip to main content

Python-scripted live slide framework

Project description

๐ŸŽ“ Auditorium

PyPI - License PyPI - Python Version PyPI

The presentation framework for people who think in code.

Auditorium lets you build live technical presentations as Python scripts. Each slide is an async def function. Animate algorithms step by step, render live-computed plots, run numerical demos โ€” anything Python can do, your slides can do. No PowerPoint. No Markdown. Just code.

from auditorium import Deck

deck = Deck(title="My Talk")

@deck.slide
async def sorting_demo(ctx):
    """Explain how the algorithm builds the sorted prefix."""
    await ctx.md("## Bubble Sort, Step by Step")
    data = [5, 3, 8, 1, 2]
    for i in range(len(data)):
        for j in range(len(data) - 1 - i):
            if data[j] > data[j + 1]:
                data[j], data[j + 1] = data[j + 1], data[j]
            await ctx.md(f"`{data}`")
            await ctx.sleep(0.5)
    await ctx.step()
    await ctx.md("**Sorted!**")
pip install auditorium
auditorium run talk.py

โœจ Why Auditorium?

Most presentation tools treat slides as static documents. Auditorium treats them as programs.

  • ๐Ÿ Run algorithms live โ€” sort arrays, traverse graphs, train models, all animated on stage
  • ๐Ÿ“Š Compute content โ€” generate plots, tables, or LaTeX from data, not screenshots
  • ๐Ÿ“ฆ Use any Python library โ€” numpy, matplotlib, pandas, whatever you import works
  • ๐ŸŒ Share with students worldwide โ€” presenter mode syncs your slides to every connected browser in real time
  • ๐Ÿ”— Go public โ€” --public gives you an instant shareable URL, no deployment needed
  • ๐Ÿ“ค Export everywhere โ€” record to video, export to PDF, or share as a self-contained HTML that replays your talk with original timing

If you've ever wished you could await inside a PowerPoint slide, this is for you.


๐Ÿš€ Quick Start

pip install auditorium    # or: uv add auditorium

Create talk.py:

from auditorium import Deck

deck = Deck(title="My Talk")

@deck.slide
async def intro(ctx):
    """Notes for the presenter โ€” only visible in presenter view."""
    await ctx.md("# Welcome!")
    await ctx.md("*Press right arrow to continue*")

@deck.slide
async def demo(ctx):
    """Show progressive reveals and timed content."""
    await ctx.md("## Key Points")
    await ctx.step()
    await ctx.md("- First point")
    await ctx.step()
    await ctx.md("- Second point")
    await ctx.sleep(1)
    await ctx.md("*(that one appeared automatically)*")

Run it:

auditorium run talk.py

๐Ÿ“‹ Features

Feature Description
๐Ÿ Imperative Python slides Each slide is an async def โ€” loops, conditionals, imports, anything
๐Ÿงช Jupyter display protocol ctx.show(obj) renders any _repr_html_ / _repr_svg_ / _repr_png_ object โ€” matplotlib, pandas, altair, tesserax, โ€ฆ
๐Ÿ‘๏ธ Progressive reveals await ctx.step() pauses for keypress, await ctx.sleep(n) auto-advances
๐Ÿงฎ LaTeX math KaTeX bundled โ€” $inline$ and $$display$$ in any markdown
๐Ÿ’ป Syntax highlighting Fenced code blocks with highlight.js (bundled)
๐Ÿ“ Flexible layouts columns, rows with "auto" sizing, arbitrarily nested
๐ŸŽค Presenter mode --presenter โ€” notes, timer, slide mirror, next-slide preview
๐Ÿ”„ Shared navigation Presenter drives all audience tabs โ€” students see what you show
๐ŸŒ Public sharing --public bridges to a relay โ€” instant shareable URL, no deployment
๐Ÿ• Late-join sync New viewers see the full slide state immediately
๐Ÿ“„ PDF / HTML / PNG export Vector PDF, self-contained interactive HTML, or PNG per slide
๐ŸŽฌ Video recording Headless or live recording via Playwright
๐Ÿ”€ Step-by-step export Each reveal as a separate frame with original timing
โ™ป๏ธ Hot reload Edit your .py and the browser updates instantly
๐Ÿ“ก Offline All assets bundled โ€” zero CDN, zero internet required
๐Ÿ”Œ Auto-reconnect Survives server restarts without losing your place

๐ŸŒ Share Publicly

Present from your laptop, share with the world:

auditorium run talk.py --public
โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Auditorium โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ Deck:   My Talk                                               โ”‚
โ”‚ Slides: 15                                                    โ”‚
โ”‚ URL:    http://127.0.0.1:8000                                 โ”‚
โ”‚ Mode:   independent (per-tab)                                 โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

Public URL: http://vps.apiad.net:4243/r/my-talk/

Anyone with the link sees your presentation in real time. No deployment, no hosting โ€” your laptop runs the deck, a lightweight relay forwards it.

# Choose your own URL slug
auditorium run talk.py --public --name my-talk

# Use your own relay server
auditorium run talk.py --public --relay myserver.com:4243

Self-host a relay (it's one command):

auditorium relay                    # run directly
make relay-install                  # install as systemd service
make relay-update                   # pull + sync + restart

๐ŸŽค Presenter Mode

Start with --presenter to sync all audience tabs to your navigation:

auditorium run talk.py --presenter

Two tabs open: your presenter view (notes + timer + slide mirror + next-slide preview) and the audience view. Navigate from the presenter tab โ€” every connected browser follows in real time.

  • ๐Ÿ“ Docstrings become speaker notes (never shown to the audience)
  • โšก Late-joining tabs catch up instantly (full slide state replayed)
  • ๐Ÿ”’ Audience keyboards are locked โ€” only the presenter navigates

Without --presenter, each tab navigates independently.


๐Ÿ“ Layouts

@deck.slide
async def layout_demo(ctx):
    """Layouts nest freely."""
    await ctx.md("## Two Columns")
    left, right = await ctx.columns([2, 1])

    async with left:
        await ctx.md("Main content (2/3 width)")

    async with right:
        await ctx.md("Sidebar (1/3)")

Use "auto" for natural-size regions:

header, body, footer = await ctx.rows(["auto", 1, "auto"])

๐Ÿงช Show Any Jupyter Object

ctx.show(...) speaks the Jupyter display protocol. Pass any object that implements _repr_html_, _repr_svg_, _repr_png_, or _repr_jpeg_ and it just renders โ€” no adapters, no bundling, no glue code.

import pandas as pd
import matplotlib.pyplot as plt
from tesserax import Canvas, Circle, Square
from tesserax.layout import RowLayout

@deck.slide
async def live_data(ctx):
    # A pandas DataFrame โ€” _repr_html_
    df = pd.DataFrame({"x": [1, 2, 3], "y": [4, 5, 6]})
    await ctx.show(df)

    # A matplotlib figure โ€” _repr_png_ (or _repr_svg_ with the svg backend)
    fig, ax = plt.subplots()
    ax.plot([1, 2, 3], [4, 5, 6])
    await ctx.show(fig)

    # A tesserax Canvas โ€” _repr_svg_
    with Canvas() as canvas:
        with RowLayout():
            Square(30, fill="green")
            Circle(20, fill="red")
    await ctx.show(canvas.fit(padding=10))

This works with matplotlib figures, pandas DataFrames, altair charts, plotly figures, tesserax canvases, sympy expressions, IPython rich objects, and anything else in the Jupyter ecosystem. Plain strings are still passed through as HTML. Runnable example: examples/tesserax_demo.py.


๐ŸŽฌ Recording & Export

Requires pip install auditorium[record] and playwright install chromium.

# Record to video
auditorium record talk.py -o talk.webm

# Export to PDF (vector), HTML (interactive), or PNG
auditorium export talk.py -f pdf -o talk.pdf
auditorium export talk.py -f html -o talk.html
auditorium export talk.py -f png -o slides/

# Step-by-step: one frame per reveal, with original timing in HTML
auditorium export talk.py -f html --step-by-step -o talk.html

โŒจ๏ธ Navigation

Key Action
โ†’ / Space Advance step or next slide
Page Down Skip to next slide
โ† Previous slide
r Restart current slide
Digits + Enter Jump to slide N

๐Ÿ“š Example

See examples/demo_deck.py for a full 11-slide deck exercising every feature.

auditorium run examples/demo_deck.py

๐Ÿ“œ License

MIT

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

auditorium-1!3.4.0.tar.gz (647.9 kB view details)

Uploaded Source

Built Distribution

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

auditorium-1!3.4.0-py3-none-any.whl (578.4 kB view details)

Uploaded Python 3

File details

Details for the file auditorium-1!3.4.0.tar.gz.

File metadata

  • Download URL: auditorium-1!3.4.0.tar.gz
  • Upload date:
  • Size: 647.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for auditorium-1!3.4.0.tar.gz
Algorithm Hash digest
SHA256 530bc17e7b95036bff36d565f83811f04e1a85ec17c5cfca475ffcd364f3b22f
MD5 f1fd646187d6c4dc9809f82a622e9851
BLAKE2b-256 29a01ccaa6187d9521e030dff0ab3cb394d1dd11fe41c24bdcb516dc4a3db1b4

See more details on using hashes here.

Provenance

The following attestation bundles were made for auditorium-1!3.4.0.tar.gz:

Publisher: deploy.yaml on apiad/auditorium

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

File details

Details for the file auditorium-1!3.4.0-py3-none-any.whl.

File metadata

  • Download URL: auditorium-1!3.4.0-py3-none-any.whl
  • Upload date:
  • Size: 578.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for auditorium-1!3.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5bdcd79424069b1017e85fba80bdd80774420dca1916e3fbb4263a8ab43033d
MD5 ff0248b79aacac7a07dc7b73ad496f54
BLAKE2b-256 da08605be1e746ef522340fb18a5a1de29f3bd2950d4ac7b10ca3d142fdd440d

See more details on using hashes here.

Provenance

The following attestation bundles were made for auditorium-1!3.4.0-py3-none-any.whl:

Publisher: deploy.yaml on apiad/auditorium

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