Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

# iterage

toolset for python iterators and generators

## iterator operations

Documentation of iterage functions and python standard library functions for do things with iterators and generators.

### reduce

#### any / iterage.reduce.iany

To check if at least one element is true, use the any built-in function:

any([True, False, False]) # -> True any([False, False, False]) # -> False

l = [0, 1, 14] any(x > 10 for x in l) # -> True any(x < 0 for x in l) # -> False

# iterage iterage.reduce.iany(l, lambda x: x > 10) # -> True

#### all / iterage.reduce.iall

To check if all elements are true:

all([True, True, True]) # -> True all([True, False, True]) # -> False

l = [0, 1, 14] any(x >= 0 for x in l) # -> True any(x < 0 for x in l) # -> False

# iterage iterage.reduce.iall(l, lambda x: x >= 0) # -> True

#### not any / iterage.reduce.inone

To check if no element is true:

not any([False, False, False]) # -> True not any([True, False, True]) # -> False

l = [0, 1, 14] not any(x >= 0 for x in l) # -> False not any(x < 0 for x in l) # -> True

# iterage iterage.reduce.inone(x < 0 for x in l) # -> True

#### iterage.reduce.iempty

Check if iterable is empty:

iterage.reduce.iempty(x < 0 for x in [0,1,2,3]) # -> True iterage.reduce.iempty(x > 1 for x in [0,1,2,3]) # -> False

#### iterage.reduce.icount

Count elements:

iterage.reduce.icount(range(4)) # -> 4

#### iterage.reduce.icount_if

Count true elements:

iterage.reduce.count_if([True, False, False]) # -> 1

iterage.reduce.count_if(x > 1 for x in [0,1,2,3]) # -> 2

# alternative sum(1 for x in [0,1,2,3] if x > 1) # -> 2 iterage.reduce.icount(x for x in [0,1,2,3] if x > 1) # -> 2

## similar tools

Metadata

Release files for iterage 0.1.dev0

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

Source distribution (sdist)

Source distribution for iterage 0.1.dev0
File Size Uploaded Provenance
iterage-0.1.dev0.tar.gz 2.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for iterage 0.1.dev0
File Interpreter ABI Platform
iterage-0.1.dev0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / iterage-0.1.dev0.tar.gz

Download URL iterage-0.1.dev0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
476c77c43915d413d34617feb30c743d6a34b7e8d6b9c3f83468c3fb70a358c5
BLAKE2b-256 checksum
How to use checksums
6f027c4b98170e72ca49c092c2392e26b0934675b6a5a9eec742107c6a2436bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.21.0 CPython/3.6.7

Release files / iterage-0.1.dev0-py3-none-any.whl

Download URL iterage-0.1.dev0-py3-none-any.whl
Size 3.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b15eafc6bae2e6e9cc120c5b2aa15cf714973a6f1422c608b327b6b62079d42
BLAKE2b-256 checksum
How to use checksums
5656d5aa947ffab65388f7bbbbacb4c6f6092d8243db9840f8ac8dcca6ef25a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.18.4 setuptools/38.5.1 requests-toolbelt/0.8.0 tqdm/4.21.0 CPython/3.6.7

Security for iterage 0.1.dev0

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.

Release history Release notifications | RSS feed

This release
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