Skip to main content

Eaterate

GitHub ● Docs

Eaterate (eet-uh-rate) is a toolkit of modern Python iterators. Or whatever the hell you wanna call this.

Key features:

  • Fully typed. C'mon, type annotations are just essential these days.
  • Quick protyping. Just chain everything.
  • Flexible. Build your custom iterators.
from eaterate import eater

eat = eater("hi!").enumerate()

for index, char in eat:
    print(index, char)

# Output:
# 0 h
# 1 i
# 2 !

Quick tour

With eaterate, you can use iterators in the easiest way possible:

eat = (
    eater([1, 2])
    .chain([4, 5])
    .map(lambda i: i * 2)
)

# collects to a list
print(eat.collect(list))

# [2, 4, 8, 10]

You can also add separators to your iterator like never before (kind of):

eat = eater([1, 2, 3]).intersperse(500)
for i in eat:
    print(i)

# Output:
# 1
# 500
# 2
# 500
# 3

There are a lot more features to try out! Refer to the Core API reference for more!

Architecture

Instead of raising StopIteration (exception-like) when an iterator ends, eaterate uses value wrappers, specifically Option[T].

Metadata

Release files for eaterate 0.2.0

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

Source distribution (sdist)

Source distribution for eaterate 0.2.0
File Size Uploaded Provenance
eaterate-0.2.0.tar.gz 12.7 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 26.5 kB

Release files / eaterate-0.2.0.tar.gz

Download URL eaterate-0.2.0.tar.gz
Size 12.7 kB
Tags Source
SHA-256 checksum
How to use checksums
0e8ee63ec502629b8a0d190ad167db826e8db4900e9d43aeab8a82f2bb962b62
BLAKE2b-256 checksum
How to use checksums
d3c15276e6f17f2f881df33ebfc0d771c97997bd56ce70eb0531bd32666d2b03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Release files / eaterate-0.2.0-py3-none-any.whl

Download URL eaterate-0.2.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c495840b5c724b0b7b271dd19ea8387532a7becc44943f2dbbbd543b1b2dabbb
BLAKE2b-256 checksum
How to use checksums
5243f9c4b36c71c354d5e0029bdf09b992cf4566813957fcfdc12f3306060715
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.13

Security for eaterate 0.2.0

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

0.2.0 This release

2 release files No provenance

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