quixio/quix-streams

Add IterableSource for testing

Opened this issue · 0 comments

After merging #420 , implement a Source that accepts a callable and returns an iterable to be used for testing.

Example:

from quixstreams import Application
from quixstreams.sources.iterable import IterableSource

# Create a source that returns an iterable (including generators)
# for testing purposes
source = IterableSource(lambda: ['a', 'b', 'c']
sdf = app.dataframe(source=source)
sdf.print()

if __name__ == '__main__':
    app.run()