Skip to main content
https://badge.fury.io/py/pyspinner.png

pyspinner is simple library for parsing text that uses spin-syntax.

Installation

To install pyspinner, simply:

$ pip install pyspinner

or download the source code and do:

$ python setup.py install

How to use it

>>> import spinning
>>> spinning.unique('The {quick|fast} {brown|gray|red} fox jumped over the lazy dog.')
'The quick gray fox jumped over the lazy dog.'

Running tests

$ python spinning-tests.py
....
----------------------------------------------------------------------
Ran 2 tests in 0.000s

OK

Features

  • Supports nested syntax.

  • Supports custom opening, closing and separator characters by using the override_params function.

TO-DO

  • Allow optional phrases: The quick{ red|} fox...

  • Allow special characters {,|,} inside text by escaping them.

  • Write more tests

Metadata

Release files for pyspinner 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distributions (sdists)

Source distribution for pyspinner 0.1.0
File Size Uploaded
pyspinner-0.1.0.zip 4.8 kB Details
pyspinner-0.1.0.tar.gz 3.4 kB Details

Release files / pyspinner-0.1.0.zip

Download URL pyspinner-0.1.0.zip
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fa8c3073faebf54ceecda0ce15cfa7b8b92f8e1df63a6fe92131cad8d97e39fa
BLAKE2b-256 checksum
How to use checksums
128e21d30b3514b20944c165e674c1d194871254b42b92c2ce1b197d6c587e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyspinner-0.1.0.tar.gz

Download URL pyspinner-0.1.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ea1c9cfb5a75fac78b7d3ba530247b4bbeb5c66d066adc5c864b016ee9d2a8d2
BLAKE2b-256 checksum
How to use checksums
2eb2d2465523f3c9cc224d230b82fe48e1ad4b3bb7dc379ccc838e48f2de7e11
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page