pypeline.core package¶
Submodules¶
pypeline.core.decors module¶
pypeline.core.funcwrap module¶
-
pypeline.core.funcwrap.check_data_in(func)[source]¶ - check if the input data matches the input requirements, the requirements are defined in
- the configuration file loaded by load_cfg(func)
Parameters: func (function) – function that will process the input data
-
pypeline.core.funcwrap.connect(func_list)[source]¶ connects the functions in the list to form an async pipeline
Parameters: func_list (list) – list of functions in the folder ./settings
pypeline.core.pipeline module¶
-
class
pypeline.core.pipeline.Pipeline(func_list=[])[source]¶ Bases:
objectpipeline to connect settings for streamline data processing. .. rubric:: Example
p = PipeLine([list of functions]) p.process(data_in) p.close() to close the pipeline
-
insert(position, func)[source]¶ Parameters: - position (int) – the position to inser the function into the pipeline
- func (function/list of function) – function to be inserted in to the pipeline
-
pop_by_idx(idx)[source]¶ Parameters: func_idx (int) – index of function to be popped out of the pipeline this is useful when there are functions with same name but idx will be different
-
pop_by_name(func_name)[source]¶ Parameters: func_name (str) – name of function to be popped out of the pipeline
-
process(data_in)[source]¶ process data or iterable data_source, then yield the result
Parameters: data_in – input data of the pipeline, this can be data or iterable data source
-