sloths
Lazy iterator pipelines for Python.
sloths is a library providing a chainable interface to easily compose lazy iterator pipelines in Python. The interface is largely inspired by Rust's Iterator trait (although it's not a carbon copy).
The 2 primary goals of the library are:
- Provide an easy to use, chainable and typed API for composing generator pipelines.
- Make it easy to control peak memory usage and throughput on large source datasets or long running input streams.
>>> from sloths import Stream
>>> Stream(range(100_000)).enumerate().filter(lambda x: x[1] % 3 == 0).skip(3).take(5).collect()
[(9, 9), (12, 12), (15, 15), (18, 18), (21, 21)]
For more examples check out the full usage documentation or the cookbook.
Installation
The project is released on PyPI.
pip install sloths
Metadata
Release files for sloths 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sloths-0.0.5.tar.gz | 67.4 kB | Without provenance | Details for sloths-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sloths-0.0.5-py3-none-any.whl | Python 3 | none | any | Details for sloths-0.0.5-py3-none-any.whl |
Total release size: 85.6 kB
Release files / sloths-0.0.5.tar.gz
| Download URL | sloths-0.0.5.tar.gz |
|---|---|
| Size | 67.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1dd354d6caf316ac1751a0cf55421c1aacc1d25b16ee7e20c1b52efacaae328e
|
|
BLAKE2b-256 checksum How to use checksums |
fe6b8ee38b08c21801a14833364ce748bc0badea061e899321e3fc68f60782a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.12
|
Release files / sloths-0.0.5-py3-none-any.whl
| Download URL | sloths-0.0.5-py3-none-any.whl |
|---|---|
| Size | 18.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cfb26928fdc06425825dbc10ce15bd141fa5f62b32e9d61a27ec3b5bcae87752
|
|
BLAKE2b-256 checksum How to use checksums |
685aac48878342e6fa7001ad0efa78c40bb8ddedcff0e492018132713645071f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.12
|
Security for sloths 0.0.5
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.