pysatl_tsp.core.data_providers.simple_data_provider

Module Contents

Classes

SimpleDataProvider

A data provider that serves data from an in-memory iterable collection.

API

class pysatl_tsp.core.data_providers.simple_data_provider.SimpleDataProvider(data: collections.abc.Iterable[pysatl_tsp.core.data_providers.abstract.T])[source]

Bases: pysatl_tsp.core.data_providers.abstract.DataProvider[pysatl_tsp.core.data_providers.abstract.T]

A data provider that serves data from an in-memory iterable collection.

This class implements a simple data provider that wraps around any iterable collection and makes it available as a data source in a processing pipeline. It’s useful for testing, working with pre-loaded data, or creating pipelines that process data already in memory.

Parameters:

data – An iterable collection containing the time series data

Initialization

Initialize a simple data provider with an iterable data source.

Parameters:

data – An iterable collection containing the time series data

__iter__() collections.abc.Iterator[pysatl_tsp.core.data_providers.abstract.T][source]

Create an iterator over the provided data collection.

This method simply yields items from the data collection that was passed during initialization, making them available to subsequent handlers in the processing pipeline.

Returns:

An iterator yielding items from the data collection