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
- Create and activate a virtual environment (recommended)
- Install the package in editable mode:
pip install -e .
- 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,ScaleTowith easing (linear,ease_in_out) - Rendering: MP4 (via ffmpeg) or GIF output
Requirements
- Python 3.9+
- On Windows/macOS/Linux,
imageio-ffmpegprovides 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
- Build distributions
python3 -m pip install --upgrade pip build twine
python3 -m build
python3 -m twine check dist/*
- Test upload to TestPyPI
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-TESTPYPI_TOKEN"
python3 -m twine upload --repository testpypi dist/*
- Test installation from TestPyPI (optional)
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple picoanim
- Upload to PyPI
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-LIVE_TOKEN"
python3 -m twine upload dist/*
Notes:
- Versioning: Update
versioninpyproject.tomlbefore uploading new releases. - What’s included:
MANIFEST.inensuresREADME.md,LICENSE, andexamples/are shipped in the sdist.
Project details
Release history Release notifications | RSS feed
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)
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
picoanim-0.1.0-py3-none-any.whl
(12.2 kB
view details)
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da187ea3b14604e363a4e3a9fa7cb2bb8c4075454507fa2b666ad38239d936bd
|
|
| MD5 |
86125908276070a105ddd6b654739133
|
|
| BLAKE2b-256 |
56a5044754e4e98e16981d98eccd4eadf552e3fde9c48f7e6143e2553eb3acdc
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ddbc3dea41d101e4f37d3b29acc0edf59a0972ee5b937bc47266452b00e4e60
|
|
| MD5 |
812ecdafa84daa40f9b14c859c92cd84
|
|
| BLAKE2b-256 |
85b2e1ece9f7d54cd6d9957ef0699f7dc952d474caec1ebca3ae5c34da9a79f8
|