Manim plugin: theme tokens, mobjects, slide hierarchy, deck manifest schema.
Project description
manim-simplex
manim-simplex is the Manim plugin layer for Simplex: theme tokens,
slide bases, reusable mobjects, animation helpers, and the shared deck
manifest schema used by the Simplex web builder.
It is published as manim-simplex and exposes modules under the
implicit namespace package simplex.
Requirements
- Python 3.13+
- Manim Community 0.20.1+
- manim-slides 5.1.7+
- Manim's system dependencies, including FFmpeg, Cairo, Pango, and a TeX distribution when rendering TeX. See the Manim installation guide: https://docs.manim.community/en/stable/installation.html
Install
pip install manim-simplex
With uv:
uv add manim-simplex
Verify that Manim can discover the plugin:
python -m manim plugins -l
The output should include simplex.
Configure Manim
Enable the plugin in the manim.cfg next to your scenes or deck:
[CLI]
plugins = simplex
save_sections = True
Manim imports simplex.plugin through the manim.plugins entry point.
The plugin applies the active Simplex theme to Manim defaults, registers
the Darcula Pygments style, sets the TeX template, sets the background
color, and enables section JSON output.
Quick Start
from manim import ORIGIN, MathTex, Write
from simplex.slides import BaseSlide, make_chrome
from simplex.theme import presets
class HelloSlide(BaseSlide):
def setup(self) -> None:
super().setup()
chrome = make_chrome(
presets.DASTIMATOR_DARK,
self.region,
header="Hello, Simplex",
)
self.add_to_canvas(**chrome.mobjects)
self.region = chrome.body_region
def construct(self) -> None:
eq = MathTex(r"e^{i\pi} + 1 = 0")
self.region.place(eq, ORIGIN)
self.play(Write(eq))
self.next_slide() # first call -> MAIN named "Hello Slide"
consequence = MathTex(r"\therefore\ \cos\pi + i\sin\pi = -1")
self.region.place(consequence, ORIGIN)
self.play(Write(consequence))
self.next_slide() # later bare calls -> SUB stops
Render as a slide deck:
manim-slides render path/to/scene.py HelloSlide
manim-slides present HelloSlide
Or, in a uv-managed project:
uv run manim-slides render path/to/scene.py HelloSlide
uv run manim-slides present HelloSlide
What Ships Here
| Module | Public surface |
|---|---|
simplex.plugin |
activate() entry point used by Manim. |
simplex.slides |
BaseSlide, OutlineScene, OutlinePart, Chrome, make_chrome. |
simplex.engine |
Region, Remove, clear_scene, exit_for, register_exit, set_exit_animation, HighlightResult, apply_theme_defaults. |
simplex.mobjects |
Node, Edge, ArrayMob, ArrayEntry, ArrayPointer, OutlineProgressBar. |
simplex.theme |
Theme, Palette, Typography, Spacing, Motion, LatexProfile, WebPalette, active_theme, get_active_theme, presets, render_web_css. |
simplex.section |
SimplexSectionType, the section strings written into Manim section JSON. |
simplex.manifest |
DeckManifest, MainSlide, Subsection, the Pydantic schema shared with simplex-py. |
Additional focused helpers live in submodules such as
simplex.engine.glyph_map, simplex.engine.code,
simplex.engine.geometry, simplex.engine.text, and
simplex.engine.debug.
Slide Hierarchy
BaseSlide.next_slide writes Simplex section types into Manim's native
section JSON. The simplex-py web builder later reconciles those
sections with manim-slides metadata.
self.next_slide(name="Title") # MAIN slide named "Title"
self.next_slide() # first bare call: MAIN named after the class
self.next_slide() # later bare calls: SUB slide
self.next_slide(loop=True) # loop variant
self.next_slide(section_type="simplex.main.skip") # explicit override
The first bare call is auto-named from the scene class, so
DFSLecture becomes DFS Lecture.
Themes
Themes are frozen Pydantic models. The same theme instance drives Manim defaults, TeX defaults, Pygments highlighting, and CSS variables for the web portal.
from manim import Tex
from simplex.theme import presets
from simplex.theme.context import active_theme
with active_theme(presets.ACADEMIC_LIGHT):
label = Tex("This Tex uses the academic light palette.")
Available presets include DASTIMATOR_DARK and ACADEMIC_LIGHT.
Outline Slides
OutlineScene turns typed OutlinePart objects into an animated agenda
slide with progress indicators.
from manim import Circle, Square, Tex
from simplex.engine.text import Caption
from simplex.slides import OutlinePart, OutlineScene
class Outline(OutlineScene):
def __init__(self, **kwargs):
super().__init__(
parts=[
OutlinePart(Tex("Research Question"), Caption("Question"), Circle()),
OutlinePart(Tex("Algorithms"), Caption("Algorithms"), Square()),
],
section_name="Outline",
**kwargs,
)
Examples
This repository includes runnable examples:
uv run manim -pql examples/theme_demo.py ThemeDemo
uv run manim -pql examples/glyph_map_demo.py GlyphMapDemo
uv run manim-slides render examples/hello_slide.py HelloSlide
uv run manim-slides render examples/outline_slide.py OutlineDemo
The examples directory has its own manim.cfg, so the Simplex plugin is
enabled when commands are run from the repository root.
Relationship To simplex-py
Simplex is split into two PyPI distributions:
| Distribution | Import namespace | Purpose |
|---|---|---|
manim-simplex |
simplex.* |
Manim plugin, slide bases, theme, mobjects, manifest schema. |
simplex-py |
simplex.* |
CLI, deck discovery, render orchestration, and static web portal. |
Both wheels intentionally contribute to the same PEP 420 namespace. This
package does not ship simplex/__init__.py; neither should downstream
extensions that want to share the namespace.
Install only manim-simplex if you want to render scenes and slides.
Install simplex-py later when you want the full lecture portal and CLI.
Development
git clone https://github.com/shlomi-perles/manim-simplex.git
cd manim-simplex
uv sync --all-extras
uv run pre-commit install
Useful checks:
uv run ruff check .
uv run ruff format --check .
uv run basedpyright
uv run pytest -q
uv build
uvx twine check dist/*
Run plugin smoke tests locally:
uv run python -c "import simplex.plugin; simplex.plugin.activate(); print('ok')"
uv run manim plugins -l
Release
Releases are published to PyPI by GitHub Actions through PyPI Trusted Publishing. To release a new version:
- Update
versioninpyproject.toml. - Move changelog entries under a dated release heading.
- Commit the release prep.
- Push an annotated tag such as
v0.2.1.
The Publish to PyPI workflow builds an sdist and wheel, checks both
with Twine, uploads them as a GitHub artifact, and publishes to PyPI via
OIDC.
License
MIT. See LICENSE.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file manim_simplex-0.2.2.tar.gz.
File metadata
- Download URL: manim_simplex-0.2.2.tar.gz
- Upload date:
- Size: 147.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b72692a2f377606b888eab9e9d70a309105043b92a63a000e5a285906f7d09f2
|
|
| MD5 |
9bb7dffc60a44b151fa67c51f076d07a
|
|
| BLAKE2b-256 |
8ea4b79b215a23d668294834e43314fbf9c914bd3ad46db83cc2b6ce16659b5d
|
Provenance
The following attestation bundles were made for manim_simplex-0.2.2.tar.gz:
Publisher:
publish-pypi.yml on shlomi-perles/manim-simplex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manim_simplex-0.2.2.tar.gz -
Subject digest:
b72692a2f377606b888eab9e9d70a309105043b92a63a000e5a285906f7d09f2 - Sigstore transparency entry: 1626255984
- Sigstore integration time:
-
Permalink:
shlomi-perles/manim-simplex@70855cefb0c91e677962d67cbc2590cfb3dfaa28 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/shlomi-perles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@70855cefb0c91e677962d67cbc2590cfb3dfaa28 -
Trigger Event:
push
-
Statement type:
File details
Details for the file manim_simplex-0.2.2-py3-none-any.whl.
File metadata
- Download URL: manim_simplex-0.2.2-py3-none-any.whl
- Upload date:
- Size: 65.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
131e63d796d775200a0a8d251e222588808f2c36e9d30a6a0bb1672f551f64c9
|
|
| MD5 |
d75dc44d7fa8eed5f5f8a37e5375fd2c
|
|
| BLAKE2b-256 |
69a3eaaac6d06eff40cec05c2c225ce019bf0a3fd24eb68c10178bad1548503c
|
Provenance
The following attestation bundles were made for manim_simplex-0.2.2-py3-none-any.whl:
Publisher:
publish-pypi.yml on shlomi-perles/manim-simplex
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
manim_simplex-0.2.2-py3-none-any.whl -
Subject digest:
131e63d796d775200a0a8d251e222588808f2c36e9d30a6a0bb1672f551f64c9 - Sigstore transparency entry: 1626256041
- Sigstore integration time:
-
Permalink:
shlomi-perles/manim-simplex@70855cefb0c91e677962d67cbc2590cfb3dfaa28 -
Branch / Tag:
refs/tags/v0.2.2 - Owner: https://github.com/shlomi-perles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@70855cefb0c91e677962d67cbc2590cfb3dfaa28 -
Trigger Event:
push
-
Statement type: