Add IterableSource for testing
Opened this issue · 0 comments
daniil-quix commented
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()