PyReveal
PyReveal is a Python library for building Reveal.js presentations programmatically. It bundles reveal.js 6.x and exports standalone HTML decks.
Features
- Two-class API: build
Slideobjects, add them toPresentation - No HTML required:
title,text,bullets,code,image, fragments, notes - Typed choices:
Theme,Transition,Plugin,FragmentEffect, and more - Reorderable vertical slides:
slide.vertical = [child_a, child_b] - Themes, transitions, backgrounds (color, image, video, iframe, gradient)
- Plugins: notes, highlight, markdown, math (KaTeX/MathJax), search, zoom
configure()for Reveal.js options (hash URLs, progress bar, scroll view, etc.)- Export self-contained HTML with bundled reveal.js assets
Requirements
- Python 3.10+
- uv (recommended) or pip
After cloning, initialize the reveal.js submodule:
git submodule update --init --recursive
Installation
pip install pyreveal
Or with uv:
uv add pyreveal
For local development:
uv sync --dev
Quick start
from pyreveal import Plugin, Presentation, Slide, Theme, Transition
intro = Slide()
intro.title = "Welcome"
intro.subtitle("Build decks in Python")
intro.vertical = [
Slide.make_text("First point"),
Slide.make_text("Second point"),
]
(
Presentation("My Presentation", theme=Theme.WHITE, transition=Transition.SLIDE)
.configure(hash=True, progress=True, slideNumber="c/t")
.plugins(Plugin.NOTES)
.add(intro)
.save("my_presentation.html")
)
Define slides with Slide(), add them with Presentation.add(). PyReveal is an alias for Presentation.
Slides
from pyreveal import BackgroundSize, FragmentEffect, Presentation, Slide, Theme
welcome = Slide()
welcome.title = "Agenda"
welcome.fragment("Introduction", effect=FragmentEffect.GROW)
welcome.bullets(["One", "Two", "Three"])
chart = Slide()
chart.heading("Chart")
chart.image("chart.png")
chart.bg("bg.jpg", size=BackgroundSize.COVER)
Presentation("Demo", theme=Theme.BLACK).add(welcome, chart)
Backgrounds accept color strings ("#222"), image paths, or dicts. No extra classes needed.
Auto-animate
Presentation("Demo").animate(
[
{"title": "Before"},
{"title": "After"},
]
)
Documentation
Versioned documentation is published with Zensical and mike:
https://tavallaie.github.io/pyreveal/
Preview locally:
uv sync --group docs
uv run zensical serve
See docs/development/versioning.md for publishing new doc versions.
Development
uv sync --dev
uv run pytest
uv build
Links
- Documentation: https://tavallaie.github.io/pyreveal/
- Issues: https://github.com/tavallaie/pyreveal/issues
- Source: https://github.com/tavallaie/pyreveal
License
MIT. See LICENSE.
Metadata
Release files for pyreveal 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyreveal-1.0.0.tar.gz | 8.2 MB | Without provenance | Details for pyreveal-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyreveal-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyreveal-1.0.0-py3-none-any.whl |
Total release size: 16.5 MB
Release files / pyreveal-1.0.0.tar.gz
| Download URL | pyreveal-1.0.0.tar.gz |
|---|---|
| Size | 8.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fc6f18860e76ab330ed851997560b15e2f7b47bfa2c617e9c1e10f28e858774
|
|
BLAKE2b-256 checksum How to use checksums |
f5ef4b46bbde19e1501022adf9ea4e8da765ceb7d936809972e3f8f9b50de93b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pyreveal-1.0.0-py3-none-any.whl
| Download URL | pyreveal-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1c580f6338e15fc6d487a4e5d31459f105962dd4ed7118ecf6f2b7cf12c38001
|
|
BLAKE2b-256 checksum How to use checksums |
21b73c3aa0769ee09a31b5d9b7a80acc2301005c697a0c7fc91046a03b37a666
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pyreveal 1.0.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.