Skip to main content

ASCII Termnial Animation Package

Project description

bruhanimate

Downloads Downloads Downloads

snow fireworks

Supported Python versions

bruhanimate provides a set of tools for creating and rendering animations directly in the terminal. Designed for ease of use, this package enables developers to incorporate dynamic animations into command-line applications. While drawing inspiration from existing terminal animation libraries, bruhanimate brings a fresh approach and offers a unique set of features tailored for flexibility and creativity in terminal-based projects.

Inspired by the Asciimatics package.

Installation

From PyPI

pip install --upgrade bruhanimate

From source

git clone https://github.com/FNBBDevs/bruhanimate
cd bruhanimate
python -m pip install .

Quick Start

Use some of the built in demos to see what is possible. There are demos for each effect. Simply import <effect>_demo from bruhanimate and call the <effect>_demo.run() to run the demo!

  • static
  • offset
  • noise
  • stars
  • snow
  • rain
  • plasma
  • gol (Conway's Game of Life)
  • matrix
  • twinkle
# Import a demo
from bruhanimate import plasma_demo
# run the demo
plasma_demo.run()

Usage

Here are some examples on how bruhanimate might be used.

Pass in arguments through the show() command.

"""
Here is a simple program that uses the EffectRenderer passing in
the arguments to the main function
"""
from bruhanimate import Screen, CenterRenderer, images


def demo(screen, img, frames, time, effect_type, background, transparent):
    renderer = CenterRenderer(screen, frames, time, img, effect_type, background, transparent)
    renderer.update_smart_transparent(True)
    renderer.effect.update_color(True)
    renderer.effect.update_intensity(100)
    renderer.run()


def main():
    Screen.show(demo, args=(images.get_image("twopoint"), 300, 0, "noise", " ", False))


if __name__ == "__main__":
    main()

Set the arguments directly in the function invoked by show().

"""
Here is a simple program that uses the EffectRenderer setting the arguments
directly in the main function.
"""
from bruhanimate import Screen, EffectRenderer


def demo(screen: Screen):
    renderer = EffectRenderer(
        screen=screen,
        frames=float("inf"),
        frame_time=0.1,
        effect_type="snow",
        background=" ",
        transparent=False
    )
    renderer.run()


if __name__ == "__main__":
    Screen.show(main)

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

bruhanimate-0.2.88.tar.gz (67.4 kB view details)

Uploaded Source

Built Distribution

bruhanimate-0.2.88-py3-none-any.whl (105.3 kB view details)

Uploaded Python 3

File details

Details for the file bruhanimate-0.2.88.tar.gz.

File metadata

  • Download URL: bruhanimate-0.2.88.tar.gz
  • Upload date:
  • Size: 67.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for bruhanimate-0.2.88.tar.gz
Algorithm Hash digest
SHA256 868400f548267a461277686a49f576efbc0d1e157f0744ca9e8b49b4ce83d8dd
MD5 e85da766491764886cf37befcd15c34e
BLAKE2b-256 694fb830e6181eae7aff0ea1cb464cd9b2847e596f9fa4aa1d52576d9d26ad2d

See more details on using hashes here.

File details

Details for the file bruhanimate-0.2.88-py3-none-any.whl.

File metadata

  • Download URL: bruhanimate-0.2.88-py3-none-any.whl
  • Upload date:
  • Size: 105.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.5 Windows/10

File hashes

Hashes for bruhanimate-0.2.88-py3-none-any.whl
Algorithm Hash digest
SHA256 23939949c3565633a8399618183d8e854f8e4b543bb3bfa3b1b62a64bafeec06
MD5 2ce35847d337c7f4d387ab1a633bba33
BLAKE2b-256 f71ea76493231b935420ac8503a6074b9c724aac8fc5b26ede3dab5f2ddd8427

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page