iter_model - provides a convenient API for interacting with iterable objects (Iterable). iter_model uses a methods approach instead of individual functions.
iter_model also provides async analog of all methods. This is useful when interacting with asynchronous iterable objects (AsyncIterable), because python does not have ready functions for these cases.
Therefore, iter_model provides SyncIter class for Iterable, and AsyncIter for AsyncIterable.
Example
from iter_model import SyncIter
it = SyncIter(range(10)) # SyncIter for sync iterables
result = (
it.where(lambda x: x % 2 == 0) # filter only odd values
.take(3) # take first 3 value
.map(lambda x: x ** 2) # square all values
)
print(result.to_list())
Links
Source code: github.com/VolodymyrBor/iter_model
Documentation: iter_model
Changelog: changelog
Metadata
Release files for iter_model 4.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 | |
|---|---|---|---|
| iter_model-4.0.5.tar.gz | 9.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| iter_model-4.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / iter_model-4.0.5.tar.gz
| Download URL | iter_model-4.0.5.tar.gz |
|---|---|
| Size | 9.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2edf171db3ecf4c293fce5aa58e28d3f705ba2b437acbeada67790182b7b0874
|
|
BLAKE2b-256 checksum How to use checksums |
07cc45fd30cda31a34a427f2077e17c44aff78367600d46b65ed559e74eb4efd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.10.19 Linux/6.14.0-1017-azure
|
Release files / iter_model-4.0.5-py3-none-any.whl
| Download URL | iter_model-4.0.5-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13a7d94f4bd631e2b72a5d929bc01f898c8c2ed713151942e28bfa70431b832f
|
|
BLAKE2b-256 checksum How to use checksums |
c20e6130f2a5310526d24f9c7fdd152482d6cc1f8b9c584efb9a8fe38dd4f428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.10.19 Linux/6.14.0-1017-azure
|