# 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:
```bash
pip install -e .
```
3. Render the included example scene:
```bash
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`:
```python
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:
```bash
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)
```bash
pip install picoanim
```
## Local development (Python 3)
```powershell
# Windows PowerShell
python3 -m venv .venv
.\.venv\Scripts\Activate.ps1
pip install -e .[dev]
```
## Publish to PyPI
1) Build distributions
```powershell
python3 -m pip install --upgrade pip build twine
python3 -m build
python3 -m twine check dist/*
```
2) Test upload to TestPyPI
```powershell
$env:TWINE_USERNAME = "__token__"
$env:TWINE_PASSWORD = "pypi-TESTPYPI_TOKEN"
python3 -m twine upload --repository testpypi dist/*
```
3) Test installation from TestPyPI (optional)
```powershell
python3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple picoanim
```
4) Upload to PyPI
```powershell
$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.
Raw data
{
"_id": null,
"home_page": null,
"name": "picoanim",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "animation, graphics, manim, pillow, imageio",
"author": "Your Name",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/56/a5/044754e4e98e16981d98eccd4eadf552e3fde9c48f7e6143e2553eb3acdc/picoanim-0.1.0.tar.gz",
"platform": null,
"description": "# picoanim\r\n\r\nA tiny 2D, programmatic animation engine inspired by Manim.\r\n\r\n- **Backend**: Pillow (raster drawing) + imageio (MP4/GIF writing)\r\n- **Use case**: Quickly script simple animated scenes with shapes and text\r\n\r\n## Quickstart\r\n\r\n1. Create and activate a virtual environment (recommended)\r\n2. Install the package in editable mode:\r\n\r\n```bash\r\npip install -e .\r\n```\r\n\r\n3. Render the included example scene:\r\n\r\n```bash\r\npicoanim render examples/hello_scene.py:HelloScene -o hello.mp4 --fps 30 --size 1280x720\r\n```\r\n\r\nThis will create `hello.mp4` in the project root.\r\n\r\n## Minimal example\r\n\r\nCreate `my_scene.py`:\r\n\r\n```python\r\nfrom picoanim import Scene, Circle, Text, MoveTo, FadeIn, ScaleTo\r\n\r\nclass MyScene(Scene):\r\n def construct(self):\r\n dot = Circle(radius=40, fill=\"#4F46E5\", stroke=\"#1F2937\", stroke_width=6)\r\n dot.x = -250\r\n self.add(dot)\r\n\r\n label = Text(\"Hello\", font_size=48, color=\"white\")\r\n label.opacity = 0\r\n self.add(label)\r\n\r\n self.play(MoveTo(dot, (0, 0), duration=1.5))\r\n self.play(FadeIn(label, duration=0.8))\r\n self.play(ScaleTo(dot, 0.6, duration=0.6))\r\n self.wait(0.5)\r\n```\r\n\r\nRender it:\r\n\r\n```bash\r\npicoanim render my_scene.py:MyScene -o out.mp4 --fps 30 --size 1280x720\r\n```\r\n\r\n## Features\r\n\r\n- **Scene graph**: Add `MObject`-based shapes: `Circle`, `Rectangle`, `Line`, `Text`\r\n- **Animations**: `MoveTo`, `FadeIn`, `FadeOut`, `ScaleTo` with easing (`linear`, `ease_in_out`)\r\n- **Rendering**: MP4 (via ffmpeg) or GIF output\r\n\r\n## Requirements\r\n\r\n- Python 3.9+\r\n- On Windows/macOS/Linux, `imageio-ffmpeg` provides an ffmpeg binary automatically.\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Install (after publishing)\r\n\r\n```bash\r\npip install picoanim\r\n```\r\n\r\n## Local development (Python 3)\r\n\r\n```powershell\r\n# Windows PowerShell\r\npython3 -m venv .venv\r\n.\\.venv\\Scripts\\Activate.ps1\r\npip install -e .[dev]\r\n```\r\n\r\n## Publish to PyPI\r\n\r\n1) Build distributions\r\n\r\n```powershell\r\npython3 -m pip install --upgrade pip build twine\r\npython3 -m build\r\npython3 -m twine check dist/*\r\n```\r\n\r\n2) Test upload to TestPyPI\r\n\r\n```powershell\r\n$env:TWINE_USERNAME = \"__token__\"\r\n$env:TWINE_PASSWORD = \"pypi-TESTPYPI_TOKEN\"\r\npython3 -m twine upload --repository testpypi dist/*\r\n```\r\n\r\n3) Test installation from TestPyPI (optional)\r\n\r\n```powershell\r\npython3 -m pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple picoanim\r\n```\r\n\r\n4) Upload to PyPI\r\n\r\n```powershell\r\n$env:TWINE_USERNAME = \"__token__\"\r\n$env:TWINE_PASSWORD = \"pypi-LIVE_TOKEN\"\r\npython3 -m twine upload dist/*\r\n```\r\n\r\nNotes:\r\n\r\n- **Versioning**: Update `version` in `pyproject.toml` before uploading new releases.\r\n- **What\u2019s included**: `MANIFEST.in` ensures `README.md`, `LICENSE`, and `examples/` are shipped in the sdist.\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Tiny 2D programmatic animation engine inspired by manim",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://example.com"
},
"split_keywords": [
"animation",
" graphics",
" manim",
" pillow",
" imageio"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "85b2e1ece9f7d54cd6d9957ef0699f7dc952d474caec1ebca3ae5c34da9a79f8",
"md5": "812ecdafa84daa40f9b14c859c92cd84",
"sha256": "4ddbc3dea41d101e4f37d3b29acc0edf59a0972ee5b937bc47266452b00e4e60"
},
"downloads": -1,
"filename": "picoanim-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "812ecdafa84daa40f9b14c859c92cd84",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 12181,
"upload_time": "2025-10-07T17:28:15",
"upload_time_iso_8601": "2025-10-07T17:28:15.120330Z",
"url": "https://files.pythonhosted.org/packages/85/b2/e1ece9f7d54cd6d9957ef0699f7dc952d474caec1ebca3ae5c34da9a79f8/picoanim-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "56a5044754e4e98e16981d98eccd4eadf552e3fde9c48f7e6143e2553eb3acdc",
"md5": "86125908276070a105ddd6b654739133",
"sha256": "da187ea3b14604e363a4e3a9fa7cb2bb8c4075454507fa2b666ad38239d936bd"
},
"downloads": -1,
"filename": "picoanim-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "86125908276070a105ddd6b654739133",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 12006,
"upload_time": "2025-10-07T17:28:16",
"upload_time_iso_8601": "2025-10-07T17:28:16.239108Z",
"url": "https://files.pythonhosted.org/packages/56/a5/044754e4e98e16981d98eccd4eadf552e3fde9c48f7e6143e2553eb3acdc/picoanim-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-07 17:28:16",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "picoanim"
}