
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
.. image:: https://badge.fury.io/py/logging-spinner.svg :target: https://pypi.python.org/pypi/logging-spinner :alt: Latest PyPI version
.. image:: https://travis-ci.org/dahlia/logging-spinner.svg :alt: Build Status :target: https://travis-ci.org/dahlia/logging-spinner
.. image:: https://raw.githubusercontent.com/dahlia/logging-spinner/0.2.2/sample.gif :alt: Demo session
This library helps to display loading spinners in CLI in non-intrusive manner.
Applications/libraries don't have to depend on any third-party API, but only
need to log loading messages through Python's standard logging
library:
.. code-block:: python
logger = logging.getLogger('myapp.logger') logger.info('Loading data...', extra={'user_waiting': True})
logger.info('Finished loading!', extra={'user_waiting': False})
At the outest code of the application, setup a SpinnerHandler
:
.. code-block:: python
from logging_spinner import SpinnerHandler
logger = logging.getLogger('myapp') logger.setLevel(logging.INFO) logger.addHandler(SpinnerHandler())
SpinnerHandler
is only aware of log records with user_waiting
extra
field and displays them with a spinner.
See also sample.py <https://raw.githubusercontent.com/dahlia/logging-spinner/0.2.2/sample.py>
_ code.
Written by Hong Minhee
__ and distributed under GPLv3_ or later.
__ https://hongminhee.org/ .. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html
Released on June 22, 2017.
ValueError
raised when a log record with
{'user_waiting': Flase}
is made without any previous log records
with {'user_waiting': True}
.Released on May 21, 2017.
SpinerHandler
had crashed when user_waiting
log
records show a spinner again after a previous spinner was hidden.Released on May 21, 2017.
logging_spinner.UserWaitingFilter
was introduced to avoid duplicate
prints of a log record with user_waiting
extra field.Released on May 21, 2017. The initial release.
FAQs
Non-intrusive spinner through standard logging library
We found that logging-spinner 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.