Name | pysnurr JSON |
Version |
0.6.0
JSON |
| download |
home_page | None |
Summary | A beautiful terminal spinner library for Python |
upload_time | 2025-01-06 19:06:18 |
maintainer | None |
docs_url | None |
author | dewe |
requires_python | >=3.10 |
license | None |
keywords |
cli
loading
progress
spinner
terminal
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# pysnurr
[](https://github.com/dewe/pysnurr/actions/workflows/tests.yml)
A beautiful terminal spinner library for Python. Provides non-blocking spinner animations at the current cursor position.
## Installation
```bash
pip install pysnurr
```
## Usage
```python
from pysnurr import Snurr, SPINNERS
import time
# Basic usage with context manager (recommended)
with Snurr() as spinner:
spinner.status = "Working..."
time.sleep(2) # Do some work
# Traditional usage
spinner = Snurr()
spinner.start()
spinner.status = "Processing..."
time.sleep(2) # Do some work
spinner.stop()
# Choose from various spinner styles
spinner = Snurr(frames=SPINNERS["CLASSIC"]) # /-\|
spinner = Snurr(frames=SPINNERS["EARTH"]) # 🌍🌎🌏
spinner = Snurr(frames=SPINNERS["HEARTS"]) # 💛💙💜💚
spinner = Snurr(frames=SPINNERS["MOON"]) # 🌑🌒🌓🌔🌕🌖🌗🌘
...
# Show spinner at end of line
print("Processing", end="")
with Snurr() as spinner:
time.sleep(2)
print(" Done!")
# Set initial status message
with Snurr(status="Starting up...") as spinner:
time.sleep(1)
spinner.status = "Processing..."
time.sleep(1)
# Update status message during spinning
with Snurr(frames=SPINNERS["EARTH"]) as spinner:
spinner.status = "Starting a long process..."
time.sleep(1)
spinner.status = "Step 1: Data processing"
time.sleep(1)
spinner.status = "Step 2: Analysis complete"
```
## Features
- Non-blocking animation
- Dynamic status messages
- Multiple built-in spinner styles:
- `CLASSIC`: Classic ASCII spinner (/-\|)
- `ARROWS`: Arrow rotation (←↖↑↗→↘↓↙)
- `BAR`: ASCII loading bar (▁▂▃▄▅▆▇█▇▆▅▄▃▂▁)
- `BLOCKS`: Minimal blocks (▌▀▐▄)
- `DOTS_BOUNCE`: Bouncing dots (.oOᐤ°ᐤOo.)
- `EARTH`: Earth rotation (🌍🌎🌏)
- `HEARTS`: Colorful hearts (💛💙💜💚)
- `MOON`: Moon phases (🌑🌒🌓🌔🌕🌖🌗🌘)
- `SPARKLES`: Sparkling animation (✨⭐️💫)
- `TRIANGLES`: Rotating triangles (◢◣◤◥)
- `WAVE`: Wave pattern (⎺⎻⎼⎽⎼⎻)
- Cursor hiding during animation
- Thread-safe status updates
- Flexible positioning at current cursor position
- Python 3.10+ support
## Development
Clone the repository and install in development mode with all development dependencies:
```bash
git clone https://github.com/dewe/pysnurr.git
cd pysnurr
make dev-install # Installs package and test dependencies
```
Run tests and checks:
```bash
make test # Run type checking and tests
make lint # Run code style checks (black & ruff)
```
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "pysnurr",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "cli, loading, progress, spinner, terminal",
"author": "dewe",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/5d/9f/45cbc339eeab7eb8200a5387871dd022eb9b713ba0bb6264c4ef2d7983c7/pysnurr-0.6.0.tar.gz",
"platform": null,
"description": "# pysnurr\n\n[](https://github.com/dewe/pysnurr/actions/workflows/tests.yml)\n\nA beautiful terminal spinner library for Python. Provides non-blocking spinner animations at the current cursor position.\n\n## Installation\n\n```bash\npip install pysnurr\n```\n\n## Usage\n\n```python\nfrom pysnurr import Snurr, SPINNERS\nimport time\n\n# Basic usage with context manager (recommended)\nwith Snurr() as spinner:\n spinner.status = \"Working...\"\n time.sleep(2) # Do some work\n\n# Traditional usage\nspinner = Snurr()\nspinner.start()\nspinner.status = \"Processing...\"\ntime.sleep(2) # Do some work\nspinner.stop()\n\n# Choose from various spinner styles\nspinner = Snurr(frames=SPINNERS[\"CLASSIC\"]) # /-\\|\nspinner = Snurr(frames=SPINNERS[\"EARTH\"]) # \ud83c\udf0d\ud83c\udf0e\ud83c\udf0f\nspinner = Snurr(frames=SPINNERS[\"HEARTS\"]) # \ud83d\udc9b\ud83d\udc99\ud83d\udc9c\ud83d\udc9a\nspinner = Snurr(frames=SPINNERS[\"MOON\"]) # \ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18\n...\n\n# Show spinner at end of line\nprint(\"Processing\", end=\"\")\nwith Snurr() as spinner:\n time.sleep(2)\nprint(\" Done!\")\n\n# Set initial status message\nwith Snurr(status=\"Starting up...\") as spinner:\n time.sleep(1)\n spinner.status = \"Processing...\"\n time.sleep(1)\n\n# Update status message during spinning\nwith Snurr(frames=SPINNERS[\"EARTH\"]) as spinner:\n spinner.status = \"Starting a long process...\"\n time.sleep(1)\n spinner.status = \"Step 1: Data processing\"\n time.sleep(1)\n spinner.status = \"Step 2: Analysis complete\"\n```\n\n## Features\n\n- Non-blocking animation\n- Dynamic status messages\n- Multiple built-in spinner styles:\n - `CLASSIC`: Classic ASCII spinner (/-\\|)\n - `ARROWS`: Arrow rotation (\u2190\u2196\u2191\u2197\u2192\u2198\u2193\u2199)\n - `BAR`: ASCII loading bar (\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588\u2587\u2586\u2585\u2584\u2583\u2582\u2581)\n - `BLOCKS`: Minimal blocks (\u258c\u2580\u2590\u2584)\n - `DOTS_BOUNCE`: Bouncing dots (.oO\u1424\u00b0\u1424Oo.)\n - `EARTH`: Earth rotation (\ud83c\udf0d\ud83c\udf0e\ud83c\udf0f)\n - `HEARTS`: Colorful hearts (\ud83d\udc9b\ud83d\udc99\ud83d\udc9c\ud83d\udc9a)\n - `MOON`: Moon phases (\ud83c\udf11\ud83c\udf12\ud83c\udf13\ud83c\udf14\ud83c\udf15\ud83c\udf16\ud83c\udf17\ud83c\udf18)\n - `SPARKLES`: Sparkling animation (\u2728\u2b50\ufe0f\ud83d\udcab)\n - `TRIANGLES`: Rotating triangles (\u25e2\u25e3\u25e4\u25e5)\n - `WAVE`: Wave pattern (\u23ba\u23bb\u23bc\u23bd\u23bc\u23bb)\n- Cursor hiding during animation\n- Thread-safe status updates\n- Flexible positioning at current cursor position\n- Python 3.10+ support\n\n## Development\n\nClone the repository and install in development mode with all development dependencies:\n\n```bash\ngit clone https://github.com/dewe/pysnurr.git\ncd pysnurr\nmake dev-install # Installs package and test dependencies\n```\n\nRun tests and checks:\n\n```bash\nmake test # Run type checking and tests\nmake lint # Run code style checks (black & ruff)\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "A beautiful terminal spinner library for Python",
"version": "0.6.0",
"project_urls": {
"Homepage": "https://github.com/dewe/pysnurr",
"Issues": "https://github.com/dewe/pysnurr/issues",
"Repository": "https://github.com/dewe/pysnurr"
},
"split_keywords": [
"cli",
" loading",
" progress",
" spinner",
" terminal"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0970a3ea899beb2f26d7140056313ec0aa063fe64aeca35af33a28cbf41301b3",
"md5": "a37cafac4f28828543cdd5967b1fcd63",
"sha256": "3765236bc421f3b33756f9fcb99bc948ebc299df779fb67d39c9f4161d534d63"
},
"downloads": -1,
"filename": "pysnurr-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a37cafac4f28828543cdd5967b1fcd63",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 7437,
"upload_time": "2025-01-06T19:06:17",
"upload_time_iso_8601": "2025-01-06T19:06:17.309473Z",
"url": "https://files.pythonhosted.org/packages/09/70/a3ea899beb2f26d7140056313ec0aa063fe64aeca35af33a28cbf41301b3/pysnurr-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5d9f45cbc339eeab7eb8200a5387871dd022eb9b713ba0bb6264c4ef2d7983c7",
"md5": "cfe1cde32888912208dd43035a844d97",
"sha256": "b17a7427f54b2e5c7f5602fe8a2caa83f91ecfe9828ab6e76ed0788e620e2534"
},
"downloads": -1,
"filename": "pysnurr-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "cfe1cde32888912208dd43035a844d97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 11638,
"upload_time": "2025-01-06T19:06:18",
"upload_time_iso_8601": "2025-01-06T19:06:18.462323Z",
"url": "https://files.pythonhosted.org/packages/5d/9f/45cbc339eeab7eb8200a5387871dd022eb9b713ba0bb6264c4ef2d7983c7/pysnurr-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-06 19:06:18",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dewe",
"github_project": "pysnurr",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pysnurr"
}