Skip to content

Add yaspin#1120

Closed
pavdmyt wants to merge 1 commit intovinta:masterfrom
pavdmyt:yaspin-cli-spinner
Closed

Add yaspin#1120
pavdmyt wants to merge 1 commit intovinta:masterfrom
pavdmyt:yaspin-cli-spinner

Conversation

@pavdmyt
Copy link
Copy Markdown

@pavdmyt pavdmyt commented Sep 11, 2018

What is this Python project?

Yaspin provides a full-featured terminal spinner to show the progress during long-hanging operations.

Features:

  • Lightweight. No external dependencies
  • Runs at all major CPython versions (2.7, 3.4, 3.5, 3.6, 3.7), PyPy and PyPy3
  • Supports all (60+) spinners from cli-spinners
  • Supports all colors, highlights, attributes and their mixes from termcolor library
  • Easy to combine with other command-line libraries, e.g. prompt-toolkit
  • Flexible API, easy to integrate with existing code
  • User-friendly API for handling POSIX signals
  • Safe pipes and redirects:
$ python script_that_uses_yaspin.py > script.log
$ python script_that_uses_yaspin.py | grep ERROR

What's the difference between this Python project and similar ones?

Intuitive and powerful API:

import time
from yaspin import yaspin

with yaspin().white.bold.shark.on_blue as sp:
    sp.text = "White bold shark in a blue sea"
    time.sleep(5)  # time consuming code

yaspin

Lightweight; Constantly evolving; Flexible and feature-rich API for handling POSIX signals.

--

Anyone who agrees with this pull request could vote for it by adding a 👍 to it, and usually, the maintainer will merge it when votes reach 20.

@manrajgrover
Copy link
Copy Markdown

How is this different from halo which was authored and released before yaspin project started?

@pavdmyt
Copy link
Copy Markdown
Author

pavdmyt commented Sep 14, 2018

@manrajgrover I would not compare halo and yaspin. halo is a great project and yaspin was greatly inspired by ideas from it. Both projects are constantly evolving and I don't see the reason for feature-to-feature comparison. The motivation behind yaspin was to create a terminal-spinner library which reflects my views on what should be considered a lightweight and user-friendly API. It's more like an experiment or an exercise.

I'd suggest to add halo to awesome-python list as well. As of now, there is no progress-bar\spinner tools in this list (except for click which contains some means for that). Even great tqdm is not included!

I think progress-bar and terminal-spinners would be a great addition to the CLI tools subsection of the awesome-python list.

P.S. if you create a PR to add halo into awesome-python list, my supporting vote will be among first ones ;)

@manrajgrover
Copy link
Copy Markdown

@pavdmyt Thanks for sharing. I would have loved a well-written criticism (in a form of an issue) which could have been discussed upon to improve halo's API (which others did and changes were incorporated). However, I do encourage everyone to write a package that serves their purpose, and hopefully will solve others problem. I'm not sure if a parallel effort is worth though.

I did raise a PR for adding halo almost a year back but it still hasn't got enough votes to be merged. Sadly, old PRs don't receive much attention and hence are stagnant.

@vinta vinta force-pushed the master branch 2 times, most recently from 23abd09 to 40cd98b Compare June 6, 2019 19:55
@stale
Copy link
Copy Markdown

stale Bot commented Oct 30, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the stale label Oct 30, 2019
@stale stale Bot closed this Nov 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants