{"id":13501777,"url":"https://github.com/dahlia/logging-spinner","last_synced_at":"2025-04-30T18:22:07.962Z","repository":{"id":62576709,"uuid":"91908898","full_name":"dahlia/logging-spinner","owner":"dahlia","description":"Display spinners (in CLI) through Python standard logging","archived":false,"fork":false,"pushed_at":"2017-06-22T08:12:49.000Z","size":61,"stargazers_count":34,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T15:28:21.252Z","etag":null,"topics":["cli","python","python-logging","python2","python3","spinner"],"latest_commit_sha":null,"homepage":"https://pypi.python.org/pypi/logging-spinner","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dahlia.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-20T18:35:34.000Z","updated_at":"2023-02-20T16:06:11.000Z","dependencies_parsed_at":"2022-11-03T19:03:13.189Z","dependency_job_id":null,"html_url":"https://github.com/dahlia/logging-spinner","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Flogging-spinner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Flogging-spinner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Flogging-spinner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dahlia%2Flogging-spinner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dahlia","download_url":"https://codeload.github.com/dahlia/logging-spinner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251758350,"owners_count":21639019,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","python","python-logging","python2","python3","spinner"],"created_at":"2024-07-31T22:01:50.006Z","updated_at":"2025-04-30T18:22:07.936Z","avatar_url":"https://github.com/dahlia.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"logging-spinner: non-intrusive spinner for Python\n=================================================\n\n.. image:: https://badge.fury.io/py/logging-spinner.svg\n   :target: https://pypi.python.org/pypi/logging-spinner\n   :alt: Latest PyPI version\n\n.. image:: https://travis-ci.org/dahlia/logging-spinner.svg\n   :alt: Build Status\n   :target: https://travis-ci.org/dahlia/logging-spinner\n\n.. image:: sample.gif\n   :alt: Demo session\n\nThis library helps to display loading spinners in CLI in non-intrusive manner.\nApplications/libraries don't have to depend on any third-party API, but only\nneed to log loading messages through Python's standard ``logging`` library:\n\n.. code-block:: python\n\n   logger = logging.getLogger('myapp.logger')\n   logger.info('Loading data...', extra={'user_waiting': True})\n   # some long taking process goes here...\n   logger.info('Finished loading!', extra={'user_waiting': False})\n\nAt the outest code of the application, setup a ``SpinnerHandler``:\n\n.. code-block:: python\n\n   from logging_spinner import SpinnerHandler\n\n   logger = logging.getLogger('myapp')\n   logger.setLevel(logging.INFO)\n   logger.addHandler(SpinnerHandler())\n\n``SpinnerHandler`` is only aware of log records with ``user_waiting`` extra\nfield and displays them with a spinner.\n\nSee also `sample.py \u003csample.py\u003e`_ code.\n\n\nAuthor and license\n------------------\n\nWritten by `Hong Minhee`__ and distributed under GPLv3_ or later.\n\n__ https://hongminhee.org/\n.. _GPLv3: https://www.gnu.org/licenses/gpl-3.0.html\n\n\n\nChangelog\n---------\n\nVersion 0.2.2\n-------------\n\nReleased on June 22, 2017.\n\n- Fixed a ``ValueError`` raised when a log record with\n  ``{'user_waiting': Flase}`` is made without any previous log records\n  with ``{'user_waiting': True}``.\n\n\nVersion 0.2.1\n-------------\n\nReleased on May 21, 2017.\n\n- Fixed a bug that ``SpinerHandler`` had crashed when ``user_waiting`` log\n  records show a spinner again after a previous spinner was hidden.\n\n\nVersion 0.2.0\n-------------\n\nReleased on May 21, 2017.\n\n- ``logging_spinner.UserWaitingFilter`` was introduced to avoid duplicate\n  prints of a log record with ``user_waiting`` extra field.\n\n\nVersion 0.1.0\n-------------\n\nReleased on May 21, 2017.  The initial release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Flogging-spinner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdahlia%2Flogging-spinner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdahlia%2Flogging-spinner/lists"}