Skip to content

CSV exporter

__init__(delimiter=',', quotechar='"', quoting=QUOTE_ALL, ignore_fields=None)

CSV exporter.

PARAMETER DESCRIPTION
delimiter

delimiter. Defaults to ",".

TYPE: str DEFAULT: ','

quotechar

quote character. Defaults to '"'.

TYPE: str DEFAULT: '"'

quoting

quoting. Defaults to QUOTE_ALL.

TYPE: int DEFAULT: QUOTE_ALL

ignore_fields

fields to ignore. By default we ignore the "result" and "payload" fields.

TYPE: list[str] | None DEFAULT: None

export(events)

Export events to CSV format.

PARAMETER DESCRIPTION
events

events to export.

TYPE: Iterable[Event]

RETURNS DESCRIPTION
str | None

str | None: CSV data.