Skip to main content

iter-model uses a method approach instead of individual functions to work with iterable objects.

Project description

IterModel

Supported Python versions Package version Test

Supported Versions Supported Versions Supported Versions Supported Versions


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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iter_model-2.3.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iter_model-2.3.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file iter_model-2.3.2.tar.gz.

File metadata

  • Download URL: iter_model-2.3.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.14 Linux/6.5.0-1017-azure

File hashes

Hashes for iter_model-2.3.2.tar.gz
Algorithm Hash digest
SHA256 47afbf96a87086b1e332e1d12e0194d8022e1c5c4f5c340a6d147b10cda80543
MD5 3bcc2c2019be9ae5284fcec419a4c250
BLAKE2b-256 65ddc895804547cfda8adaaabd39a0cc43953270d552a5edfdf0e3a153a4be76

See more details on using hashes here.

File details

Details for the file iter_model-2.3.2-py3-none-any.whl.

File metadata

  • Download URL: iter_model-2.3.2-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.14 Linux/6.5.0-1017-azure

File hashes

Hashes for iter_model-2.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dde983a1b029267ee2e260ace7e103b2964c28164083ff51a044f92db60ee9e4
MD5 bbdf19c0effd87cc13f2aa56a7bc068e
BLAKE2b-256 a4c8397f9cdce44b524b1991d6c5314738e06b1f8b4f55e887c33fa6146e79c3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page