A simple terminal animation library
Project description
Animpy 🎬
Make cool terminal animations without the pain. Move text around, use RGB colors, play audio, and build actual animations. Works great on modern terminals.
Examples
- Particle simulation
- The zen of python
- Audio example
- Loading screen
- Tag game
- Collision example
- Player Controls
Install
pip install animpy
Quick Start
import animpy
scene = animpy.Scene()
text = animpy.Text("Hello!", 10, 5, r=255, g=100, b=50)
scene.add(text)
scene.render()
How It Works
Text – Create animated text:
text = animpy.Text("Hi", 0, 0, r=255, g=0, b=0)
text.moveX(10) # Move right
text.moveY(5) # Move down
text.centerX() # Center horizontally
text.change_rgb_values(0, 255, 0) # Change color
text.collides_with(other_text) # Check collision with another text
text.width, text.height # Get dimensions
text.type_out("Type me!", speed=0.05, scene=scene) # Type effect
text.fall(velocity=2, floor=15) # Falling effect
text.change_frame() # Cycle through frames (if you used a list)
Scene – Render everything:
scene = animpy.Scene()
scene.add(text1, text2, text3)
scene.render()
scene.clear()
Interactive Scene – Handle real-time input:
scene = animpy.InteractiveScene()
scene.add(text1, text2, text3)
scene.render()
scene.clear()
scene.key_pressed("w") # Check if 'w' is pressed
Audio – Play sounds:
audio = animpy.Audio()
audio.load("bg", "music.mp3")
audio.play("bg", loop=-1)
audio.stop_all()
audio.is_playing("track")
Version History
v1.4.0
- Added three new examples to Github example folder
- Added new class
InteractiveScenethat allows for real-time keyboard input - Added collision detection method
collides_withtoTextclass
v1.3.6
- Added
audio.is_playing()method to check if audio is currently playing - Added two more examples to Github example folder
v1.3.5
- Added
scene.clearmethod to clear the scene - Added version history to README
Made with ❤️ by a human.
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
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 animpy-1.4.0.tar.gz.
File metadata
- Download URL: animpy-1.4.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b1dab61e55f439e93d362abae416cd85c5941b50504b0ce332811c018614792
|
|
| MD5 |
67a394e737678d4e639ee3d545724dc5
|
|
| BLAKE2b-256 |
b97b08065f5a687600137a032e6861e971b50a6525ef4c430c310a23241e80a0
|
File details
Details for the file animpy-1.4.0-py3-none-any.whl.
File metadata
- Download URL: animpy-1.4.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac2b70c8d041078d7b230b0b94b391e416be55156a0d81cbbc60542a3eb5d3f5
|
|
| MD5 |
a86ae2112c1ae58299b4d8afa1a449d6
|
|
| BLAKE2b-256 |
4df1092194f1f1c1e68f780f63eb8664709e14b4c66d1458509c2b4eed0014e3
|