Skip to main content

pystreams

Chainable functional API for list processing

Installation

pip install pystreams

💡 Usage Examples

Basic Operations

from pylib_streams import Stream, map, filter, reduce

# Using Stream class
result = Stream([1, 2, 3, 4, 5])\
    .map(lambda x: x * 2)\
    .filter(lambda x: x > 5)\
    .to_list()
# [6, 8, 10]

# Using functional API
doubled = map(lambda x: x * 2, [1, 2, 3])
filtered = filter(lambda x: x > 2, [1, 2, 3, 4])
summed = reduce(lambda a, b: a + b, [1, 2, 3, 4])
# 10

AI/ML Use Cases

from pylib_streams import Stream, map, filter, reduce

# Process ML predictions
predictions = Stream([0.1, 0.5, 0.9, 0.3])\
    .filter(lambda p: p > 0.5)\
    .map(lambda p: "high" if p > 0.8 else "medium")\
    .to_list()

# Transform training data
features = Stream(raw_data)\
    .map(extract_features)\
    .filter(is_valid)\
    .to_list()

📚 API Reference

See package documentation for complete API reference.

🤖 AI Agent Friendly

This package is optimized for AI agents and code generation tools:

  • Clear function names and signatures
  • Comprehensive docstrings with examples
  • Type hints for better IDE support
  • Common use cases documented
  • Zero dependencies for reliability

License

MIT

Release files for pylib-streams 0.1.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 pylib-streams 0.1.0
File Size Uploaded
pylib_streams-0.1.0.tar.gz 2.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylib-streams 0.1.0
File Interpreter ABI Platform
pylib_streams-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.5 kB

Release files / pylib_streams-0.1.0.tar.gz

Download URL pylib_streams-0.1.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
11d49acded074d6001f1c24a82e7018b22af351ef586d886a5b89643ca4e2127
BLAKE2b-256 checksum
How to use checksums
d3214ca00048ca6e3dfb2971500343da684524fd625a48aac354a4aa5b4c21a0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / pylib_streams-0.1.0-py3-none-any.whl

Download URL pylib_streams-0.1.0-py3-none-any.whl
Size 2.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea81750d4feae4e20c7cf6f4b05dfc9ccd1064c7cbd8665eee35cd8d854898c1
BLAKE2b-256 checksum
How to use checksums
9781746f4eccc32a38110eb6fec84236a9361f703113371c4ab207e6d7219af8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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