
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
A simple package to make beautiful terminal wait animations
pip install terminal-animation
import animation
import time
# 1 use as class
wait_animation = animation.Wait()
wait_animation.start()
do_something()
wait_animation.end()
#2 use as decorator
@animation.wait()
def do_something_else():
# long function
time.sleep(5)
The package uses a default animation with dots. It allows users to customize the the animation with different parameters.
The default settings are:
color: white
speed: 0.2
animation = [' ','. ','.. ','... ','....']
The color of the characters. Available options are:
The speed between, the animation states.
0 < speed < 1
To use a custom animation, you have to pass a string array containing the seperate steps of the animation. For example, a simple clock animation would look like this
clock = ['-','\\','|','/']
@animation.wait(clock)
def do_something():
# long function
# default animation (white, dots, default speed)
@animation.wait()
def default():
time.sleep(10)
# clock animation (white, default speed)
clock = ['-','\\','|','/']
@animation.wait(clock)
def do_something():
time.sleep(10)
# horizontal line animation (blue, default speed)
lines = [' ','- ','-- ','---']
@animation.wait(lines, color="blue")
def do_something_else():
time.sleep(10)
# hashtag animation (cyan, slow)
tags = ["# ", "## ", "### ", "####"]
animation = animations.Wait(tags, color="blue", speed=0.5)
animation.start()
time.sleep(4)
animation.stop()
FAQs
Decorators for terminal-based wait animations.
We found that terminal-animation demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.