pyfx
Terminal visual effects for Python. Create animated fire, Matrix rain, stars, rainfall, confetti and particle explosions with one function call. Includes a tiny ASCII drawing canvas.
Install
pip install pyfx-terminal
Quick start
import pyfx
pyfx.fire()
pyfx.matrix()
pyfx.stars()
pyfx.rain()
pyfx.confetti()
pyfx.explosion()
Press Ctrl+C to stop looping effects. Effects use ANSI terminal colours when stdout is an interactive terminal and the NO_COLOR environment variable is not set.
Control the animation
import pyfx
pyfx.matrix(fps=30, density=0.07)
pyfx.stars(count=180, fps=24)
pyfx.fire(intensity=0.8, frames=200)
pyfx.explosion(frames=30)
frames=None means loop until interrupted. frames=100 renders 100 frames and exits.
Choose an effect by name
import pyfx
pyfx.run("confetti", count=150)
Available names: fire, matrix, stars, rain, confetti, explosion.
Draw your own ASCII art
from pyfx import Canvas
screen = Canvas(40, 12)
screen.rectangle(1, 1, 38, 10)
screen.text(4, 3, "Hello from pyfx!")
screen.line(3, 7, 35, 7, "=")
screen.show()
Canvas methods can be chained. Coordinates start at the top-left corner.
Examples
python examples/drawing.py
Notes
- Best experienced in a modern terminal with ANSI escape support.
- The terminal is cleared while an animation runs.
- This first version uses text-based rendering, so no external dependencies are required.
Metadata
Release files for pyfx-terminal 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyfx_terminal-0.1.3.tar.gz | 5.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfx_terminal-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.4 kB
Release files / pyfx_terminal-0.1.3.tar.gz
| Download URL | pyfx_terminal-0.1.3.tar.gz |
|---|---|
| Size | 5.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f9cf5688203d9481da442baaaf6c4de4bdc3e4d3e39ac57d854ae70270c44546
|
|
BLAKE2b-256 checksum How to use checksums |
ae2be118ce4deb7d35b8d05762859d34583598e3cdd5ff9c93c0559eeca2a36f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyfx_terminal-0.1.3-py3-none-any.whl
| Download URL | pyfx_terminal-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
302f3b700d6d3657c06b1e1e6849a0d24eb13bd1d16ee48395e381e8013cea0b
|
|
BLAKE2b-256 checksum How to use checksums |
c1ea2e9eee5c7119cf6de25d909c10cc76ac43a8945c450766c0fac5aca06e8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|