databay.outlets.csv_outlet

class databay.outlets.csv_outlet.CsvOutlet(default_filepath: str, default_file_mode: str = 'a', *args, **kwargs)[source]

databay.outlets.csv_outlet.CsvOutlet

Outlet that writes records to a csv file.

Parameters
  • default_filepath (str) – Filepath of the default csv file to write records to.

  • default_file_mode (str) – Default write mode to use when writing into the csv file.

Bases: databay.outlet.Outlet

push(self, records: [Record], update)[source]

Writes records to a csv file.

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.