A lazy evaluating, memory friendly, chainable stream solution


Keywords
stream, generator, chain, stream-processing, streams
License
MIT
Install
pip install pyStreamer==0.4.1

Documentation

pystreamer

Build Status

A lazy evaluating, memory friendly, chainable stream solution.

Inspired by the syntactical sugar of Java stream.

from streamer import Stream
with open("myfile.txt") as f_input:
    uniq = Stream(f_input) \
        .map(str.strip) \
        .flat_map(str.split) \
        .collect(set)   # uniq tokens in a file