pyrio.iterators.stream_generator ================================ .. py:module:: pyrio.iterators.stream_generator Classes ------- .. autoapisummary:: pyrio.iterators.stream_generator.StreamGenerator Module Contents --------------- .. py:class:: StreamGenerator Helper class wrapping generator-based operations for lazy evaluation .. py:method:: concat(*streams) :staticmethod: Concatenates multiple iterables into a single sequence .. py:method:: filter(iterable, predicate) :staticmethod: Yields elements that satisfy the predicate .. py:method:: map(iterable, mapper) :staticmethod: Applies mapper function to each element .. py:method:: filter_map(iterable, mapper, discard_falsy=False) :staticmethod: Filters out None (or falsy) values and applies mapper to remaining elements .. py:method:: flat_map(iterable, mapper) :staticmethod: Applies mapper and flattens the resulting iterables .. py:method:: flatten(iterable) :classmethod: Recursively flattens nested iterables into a single sequence .. py:method:: peek(iterable, operation) :staticmethod: Performs operation on each element without consuming the stream .. py:method:: iterate(seed, operation, condition=None) :staticmethod: Generates sequence by repeatedly applying operation to seed .. py:method:: generate(supplier) :staticmethod: Generates infinite sequence using supplier function .. py:method:: range(start, stop, step=1) :staticmethod: Yields values from start to stop with given step .. py:method:: distinct(iterable) :staticmethod: Yields unique elements preserving first occurrence order .. py:method:: skip(iterable, count) :staticmethod: Skips first n elements and yields the rest .. py:method:: limit(iterable, count) :staticmethod: Yields at most n elements .. py:method:: tail(iterable, count) :staticmethod: Yields the last n elements .. py:method:: take_while(iterable, predicate) :staticmethod: Yields elements while predicate is true .. py:method:: drop_while(iterable, predicate) :staticmethod: Skips elements while predicate is true, then yields the rest .. py:method:: sort(iterable, comparator=None, reverse=False) :staticmethod: Yields elements in sorted order .. py:method:: enumerate(iterable, start=0) :staticmethod: Yields index-element pairs starting from given index