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.96.tar.gz (64.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bruhanimate-0.2.96-py3-none-any.whl (104.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bruhanimate-0.2.96.tar.gz
  • Upload date:
  • Size: 64.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Windows/11

File hashes

Hashes for bruhanimate-0.2.96.tar.gz
Algorithm Hash digest
SHA256 77f7b041a957fdb86e03fa2b9a9ad22133f343a915d730c2f11e54d750a85c22
MD5 2612fc90aa1be848a303d3cabbdf7fcb
BLAKE2b-256 e69cdde89513f216c41cadb6d51c5f7c364337842487b3587c42268f46c8035c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bruhanimate-0.2.96-py3-none-any.whl
  • Upload date:
  • Size: 104.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.0 CPython/3.13.7 Windows/11

File hashes

Hashes for bruhanimate-0.2.96-py3-none-any.whl
Algorithm Hash digest
SHA256 217f7ba47452cb3adaac951a7d2ede02086feb8513aa24840b26f2abb7425ed0
MD5 af2ca11fae34d9b41df3793e81560645
BLAKE2b-256 6f618be82ca0c31b45b08c3e653dfa257a381b37fc41770b30516a341b5486c9

See more details on using hashes here.

Supported by

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