Skip to main content

kinemo

CI PyPI License: MIT OR Apache-2.0

Website and documentation

Explanatory animations (math, algorithms, engineering, data) written in Python, with a live preview and a native core in Rust. The API was designed to be written by people and by AI without errors: one form per concept, full typing, and errors that already carry the fix.

import kinemo as k

@k.scene
def hello(s: k.Scene):
    title = k.Text("Hello, kinemo").place(at="center")
    s.play(k.write(title))
    s.play(title.to(color=k.BLUE, scale=1.5))
    s.wait(1)
kinemo dev hello.py        # browser preview with hot reload and a draggable timeline
kinemo check hello.py      # errors, lints and timeline summary, without rendering
kinemo render hello.py     # MP4 (also webm, mov, gif, png, slides)

What kinemo does

  • The script runs once and produces a timeline. The frame at t is a pure function of t: you can scrub the timeline, render in parallel and keep everything cached.
  • Explicit time. s.play blocks the cursor, s.start does not; k.seq, k.par, k.stagger, s.during, s.tempo and clips (@k.clip) compose animations as values.
  • Constraint layout. .place(above=tri), k.Row, k.Grid: the relations keep holding while the objects move.
  • Reactive signals. x.to(3), k.Text(lambda: f"{x():.1f}"), ball.set(x=other.x). Lambdas and .map are traced to native code; opaque Python only with k.python(fn).
  • Events and stateful systems. k.when, @event.on, s.wait_for, k.integrate, k.simulate — resolved before rendering, up to a fixed point.
  • Text, code and math with addressable parts (txt["world"], code.highlight) and k.morph between versions.
  • Charts and data. k.Axes, plots that grow with a signal, animated zoom; data via Arrow (polars, pandas, pyarrow, duckdb) without copying.
  • Stable diagnostics. Every error has a code (K0401), line, instant and fix; kinemo check --fix applies the safe ones. Manim names (Create, .animate) are recognized and translated.
  • Built for agents. kinemo check --json, kinemo inspect --json, kinemo snap and the kinemo mcp server close the write → verify → fix loop without needing vision.

Installation

pip install kinemo

Wheels for Linux, macOS and Windows, Python ≥ 3.11. Video output needs ffmpeg on your path. kinemo new hello starts a project.

From source

Requirements: stable Rust, Python ≥ 3.11, uv and ffmpeg. See CONTRIBUTING.md for the tests and conventions.

uv venv .venv
uv pip install --python .venv/bin/python maturin pytest numpy polars
source .venv/bin/activate
maturin develop

GPU preview (optional): maturin develop --features gpu compiles the Vello (wgpu) backend and the kinemo dev server then rasterizes on the GPU when an adapter is available, falling back to the CPU (tiny-skia) otherwise. The default build does not include wgpu. The final render stays on the CPU, which is the reference.

Tests

cargo test --workspace          # Rust core
python -m pytest -q             # API, diagnostics, contracts and golden snapshots

Golden snapshots live in tests/golden/ (CPU renderer, byte-identical). To regenerate them after an intentional change: KINEMO_UPDATE_GOLDEN=1 pytest tests/python/test_golden.py.

Architecture

The author only sees Python; everything below the IR is Rust.

python/kinemo/        public API (k.*), build phase, handlers, CLI
crates/kinemo-ir      IR types (serializable scene)
crates/kinemo-eval    timelines, expressions, easing, colors (OKLab)
crates/kinemo-layout  geometry, containers, constraints, glyphs
crates/kinemo-text    text (rustybuzz), embedded fonts
crates/kinemo-code    code highlighting (tree-sitter) and diff
crates/kinemo-math    LaTeX → typst, no TeX installation
crates/kinemo-resolve sampling-based visual lints
crates/kinemo-render  display list, tiny-skia, morph, movies, segments
crates/kinemo-render-gpu  optional Vello (wgpu) backend, tolerance tests vs tiny-skia
crates/kinemo-encode  ffmpeg (mp4, webm, mov, gif)
crates/kinemo-server  preview (axum + WebSocket)
crates/kinemo-py      PyO3 bindings (the only crate that knows about Python)

Documentation

Start with the documentation index: numbered guides from getting started onwards, the complete API reference, examples with rendered frames, and caveats. The design document is docs/specs.md.

The same docs, with a landing page and the examples as videos, build into a static SvelteKit website: see website/README.md.

License

Licensed under either of Apache License 2.0 or MIT, at your option. Unless you state otherwise, any contribution you submit for inclusion in kinemo is dual-licensed as above, without any additional terms.

The embedded DejaVu fonts follow their license. The licenses of the Rust crates compiled into the wheels are in THIRD_PARTY_LICENSES.md (scripts/third_party_licenses.py regenerates it).

Metadata

Release files for kinemo 0.10.1

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

Source distribution (sdist)

Source distribution for kinemo 0.10.1
File Size Uploaded
kinemo-0.10.1.tar.gz 558.4 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for kinemo 0.10.1
File
kinemo-0.10.1-cp311-abi3-win_amd64.whl CPython 3.11 abi3 Windows x86-64 Details
kinemo-0.10.1-cp311-abi3-manylinux_2_28_x86_64.whl CPython 3.11 abi3 Linux glibc 2.28+ x86-64 Details
kinemo-0.10.1-cp311-abi3-manylinux_2_28_aarch64.whl CPython 3.11 abi3 Linux glibc 2.28+ ARM64 Details
kinemo-0.10.1-cp311-abi3-macosx_11_0_arm64.whl CPython 3.11 abi3 macOS 11.0+ ARM64 Details
kinemo-0.10.1-cp311-abi3-macosx_10_12_x86_64.whl CPython 3.11 abi3 macOS 10.12+ x86-64 Details

Total release size: 143.8 MB

Release files / kinemo-0.10.1.tar.gz

Download URL kinemo-0.10.1.tar.gz
Size 558.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f26f1cef80d07cc182a7c894eabeb32213c4bcb7f89b7ac2b7f4bf94c86093d9
BLAKE2b-256 checksum
How to use checksums
355699f1152c6cfc37a6185bd7b7316927d5b2995ba26ba3fceb984632073494
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / kinemo-0.10.1-cp311-abi3-win_amd64.whl

Download URL kinemo-0.10.1-cp311-abi3-win_amd64.whl
Size 27.2 MB
Tags CPython 3.11 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
d9e56ea0976ecf73c00d1725ddcdf3e1eb0f0d5025e69194706be0b1721fe4af
BLAKE2b-256 checksum
How to use checksums
6e2b5a9e37168d5933963bd6b7f04a8c4ef383acc7370534e95b9d1568b3f14a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / kinemo-0.10.1-cp311-abi3-manylinux_2_28_x86_64.whl

Download URL kinemo-0.10.1-cp311-abi3-manylinux_2_28_x86_64.whl
Size 29.4 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
0d517b3f40e763135a19ccf2888aabea3e787ca7d16574ea8bc83946f0585be5
BLAKE2b-256 checksum
How to use checksums
a610cdf3c1ac86214d406770cd37cb92e775ab0bcf0dbb196c5f3691f0088ca2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / kinemo-0.10.1-cp311-abi3-manylinux_2_28_aarch64.whl

Download URL kinemo-0.10.1-cp311-abi3-manylinux_2_28_aarch64.whl
Size 30.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
ca865f7440b9057d225a7c6820650fca64948632f0e8d681749aca98201b90da
BLAKE2b-256 checksum
How to use checksums
71e23e56a820851a3bf66cacaf2f81a7eef9faaeda5a4a88c213fd493b4ac773
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / kinemo-0.10.1-cp311-abi3-macosx_11_0_arm64.whl

Download URL kinemo-0.10.1-cp311-abi3-macosx_11_0_arm64.whl
Size 27.9 MB
Tags CPython 3.11 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
299549db1734d24b5c7122df18b94c5a8e6503ba1568b73b12701bf5106c0aaf
BLAKE2b-256 checksum
How to use checksums
6db2a172c2817728998c8ec75b3665c46af814b1b1a3aff0f77a9619dd518784
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release files / kinemo-0.10.1-cp311-abi3-macosx_10_12_x86_64.whl

Download URL kinemo-0.10.1-cp311-abi3-macosx_10_12_x86_64.whl
Size 28.3 MB
Tags CPython 3.11 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2b4b4b0cb6e14d2d2481bf92eabffe7bd3b2ff045a15da2f765890394a29ca4f
BLAKE2b-256 checksum
How to use checksums
aba1853b10a95977f050aa009115510fbbd890293a2af2b025109003542ce0ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 4, 2026.

Transparency log

Release history Release notifications | RSS feed

0.19.0

6 release files

0.18.0

6 release files

0.17.0

6 release files

This release

0.10.1 This release

6 release files

0.9.0

6 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