Skip to main content

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.

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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfx-terminal 0.1.2
File Size Uploaded
pyfx_terminal-0.1.2.tar.gz 5.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyfx-terminal 0.1.2
File Interpreter ABI Platform
pyfx_terminal-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 12.3 kB

Release files / pyfx_terminal-0.1.2.tar.gz

Download URL pyfx_terminal-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cdbc9c01cfd9d1c911150232e58a1a6c79c5d8846e68bbee45d30da7422278fd
BLAKE2b-256 checksum
How to use checksums
f903cf487bcf9e9b187bd67891bd93d83225c482b856baa546ef34730dfcbfa2
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.2-py3-none-any.whl

Download URL pyfx_terminal-0.1.2-py3-none-any.whl
Size 6.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e788012826577a286ec59b3f63cdfb13a4de07f37724e5f81588b17aa0f9756
BLAKE2b-256 checksum
How to use checksums
692c5b43754bc4830b2f4519f0775a4654ed4570536498e011cc077ebcf93c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

0.1.3

2 release files

This release

0.1.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page