Skip to main content

README

A pure-python list-shifter/wrapper. Shifts/Wraps an iterable left or right by any amount (modulo to the length of iterable). Can optionally shift the iterable in-place. Create a shifty instance to add these convenience methods to the default list implementation if you prefer.

Why slice when you can shift ‘like-a-boss’ ?!

Codeship Status Build Status Downloads Latest Version Supported Python versions Development Status Wheel Status Egg Status Download format License

How do I get set up?

  • python setup.py install

  • Dependencies: six

  • Dependencies (test): Coverage, nose

  • How to run tests: ./runtests.sh

  • Deployment instructions: pip install shifty

Contribution guidelines

I accept pull requests.

What about test coverage?

There is a full suite of unit-tests.

Who do I talk to?

  • Francis Horsman: francis.horsman@gmail.com

Example

>>> from shifty import shift_left, shifty

>>> a = [1, 2, 3, 4]
>>> b = shift_left(a, 3)
>>> b
[4, 1, 2, 3]
>>> assert a is not b

>>> b = shift_left(a, 2, in_place=True)

>> assert a is b

>>> b = shift_left(a, 5)

>>> b
[4, 1, 2, 3]

Metadata

Release files for shifty 1.0.8

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

Source distribution (sdist)

Source distribution for shifty 1.0.8
File Size Uploaded Provenance
shifty-1.0.8.tar.gz 10.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for shifty 1.0.8
File Interpreter ABI Platform
shifty-1.0.8-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 23.5 kB

Release files / shifty-1.0.8.tar.gz

Download URL shifty-1.0.8.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e1234a289a65e3b51bff19afb7178abe74194096e8fd13745c45915d2089b2ca
BLAKE2b-256 checksum
How to use checksums
0bc54166223d0606e197c9a36be3cc4684bb0f0dde0c51295317eff8bc925422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / shifty-1.0.8-py2.py3-none-any.whl

Download URL shifty-1.0.8-py2.py3-none-any.whl
Size 12.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
6f416b0f52a7cca7f8c777376c3203cceff5523eb63cc2214a3d37e37c1b145f
BLAKE2b-256 checksum
How to use checksums
59e44238a7d081398b19ecb1599c6a9fc59e11b9360023a2450b331f0dac24ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for shifty 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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