databay.outlet¶
See also
Extending Outlets to learn how to extend this class correctly.
Inletrepresenting the corresponding input of the data stream.
-
class
databay.outlet.Outlet(processors: Union[callable, List[callable]] = None)[source]¶ databay.outlet.Outlet
Abstract class representing an output of the data stream.
- Parameters
processors (
callableor list[callable]) – Processors of this outlet.Default:None
Bases:
abc.ABC-
push(self, records: List[Record], update: da.Update)[source]¶ abstractmethod
Push received data.
Override this method to define how this outlet will handle received data.
- Parameters
records (list[
Record]) – List of records generated by inlets. Each top-level element of this array corresponds to one inlet that successfully returned data. Note that inlets could return arrays too, making this a nested array.update (
Update) – Update object representing the particular Link transfer.
-
on_start(self)[source]¶ Called once per outlet just before the governing planner is about to start.
Override this method to provide starting functionality on this outlet.
-
try_shutdown(self)[source]¶ Wrapper around on_shutdown call that will ensure it only gets executed once.