Skip to main content

Tiny 2D programmatic animation engine inspired by manim

Project description

picoanim

A tiny 2D, programmatic animation engine inspired by Manim.

  • Backend: Pillow (raster drawing) + imageio (MP4/GIF writing)
  • Use case: Quickly script simple animated scenes with shapes and text

Quickstart

  1. Create and activate a virtual environment (recommended)
  2. Install the package in editable mode:
pip install -e .
  1. Render the included example scene:
picoanim render examples/hello_scene.py:HelloScene -o hello.mp4 --fps 30 --size 1280x720

This will create hello.mp4 in the project root.

Minimal example

Create my_scene.py:

from picoanim import Scene, Circle, Text, MoveTo, FadeIn, ScaleTo

class MyScene(Scene):
    def construct(self):
        dot = Circle(radius=40, fill="#4F46E5", stroke="#1F2937", stroke_width=6)
        dot.x = -250
        self.add(dot)

        label = Text("Hello", font_size=48, color="white")
        label.opacity = 0
        self.add(label)

        self.play(MoveTo(dot, (0, 0), duration=1.5))
        self.play(FadeIn(label, duration=0.8))
        self.play(ScaleTo(dot, 0.6, duration=0.6))
        self.wait(0.5)

Render it:

picoanim render my_scene.py:MyScene -o out.mp4 --fps 30 --size 1280x720

Features

  • Scene graph: Add MObject-based shapes: Circle, Rectangle, Line, Text
  • Animations: MoveTo, FadeIn, FadeOut, ScaleTo with easing (linear, ease_in_out)
  • Rendering: MP4 (via ffmpeg) or GIF output

Requirements

  • Python 3.9+
  • On Windows/macOS/Linux, imageio-ffmpeg provides an ffmpeg binary automatically.

License

MIT

Install (after publishing)

pip install picoanim

Local development (Python 3)

# Windows PowerShell
python3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]

Publish to PyPI

  1. Build distributions
python3 -m pip install --upgrade pip build twine
python3 -m build
python3 -m twine check dist/*
  1. Test upload to TestPyPI
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-TESTPYPI_TOKEN"
python3 -m twine upload --repository testpypi dist/*
  1. Test installation from TestPyPI (optional)
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple picoanim
  1. Upload to PyPI
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-LIVE_TOKEN"
python3 -m twine upload dist/*

Notes:

  • Versioning: Update version in pyproject.toml before uploading new releases.
  • What’s included: MANIFEST.in ensures README.md, LICENSE, and examples/ are shipped in the sdist.

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

picoanim-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

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

picoanim-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file picoanim-0.1.0.tar.gz.

File metadata

  • Download URL: picoanim-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for picoanim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 da187ea3b14604e363a4e3a9fa7cb2bb8c4075454507fa2b666ad38239d936bd
MD5 86125908276070a105ddd6b654739133
BLAKE2b-256 56a5044754e4e98e16981d98eccd4eadf552e3fde9c48f7e6143e2553eb3acdc

See more details on using hashes here.

File details

Details for the file picoanim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: picoanim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for picoanim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ddbc3dea41d101e4f37d3b29acc0edf59a0972ee5b937bc47266452b00e4e60
MD5 812ecdafa84daa40f9b14c859c92cd84
BLAKE2b-256 85b2e1ece9f7d54cd6d9957ef0699f7dc952d474caec1ebca3ae5c34da9a79f8

See more details on using hashes here.

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