exporters.export_formatter package¶
Submodules¶
exporters.export_formatter.base_export_formatter module¶
exporters.export_formatter.csv_export_formatter module¶
-
class
exporters.export_formatter.csv_export_formatter.
CSVExportFormatter
(*args, **kwargs)[source]¶ Bases:
exporters.export_formatter.base_export_formatter.BaseExportFormatter
This export formatter provides a way of exporting items in CSV format. This are the supported options:
- show_titles(bool)
- If set to True, first lines of exported files will have a row of column names
- fields(list)
- List of item fields to be exported
- schema(dict)
- Valid json schema of dataset items
- delimiter(str)
- field delimiter character for csv rows
-
file_extension
= 'csv'¶
-
supported_options
= {'fields': {'default': [], 'type': <class 'exporters.utils.list[unicode]'>}, 'show_titles': {'default': True, 'type': <type 'bool'>}, 'delimiter': {'default': ',', 'type': (<type 'basestring'>,)}, 'schema': {'default': {}, 'type': <type 'dict'>}}¶
exporters.export_formatter.json_export_formatter module¶
-
class
exporters.export_formatter.json_export_formatter.
JsonExportFormatter
(*args, **kwargs)[source]¶ Bases:
exporters.export_formatter.base_export_formatter.BaseExportFormatter
This export formatter provides a way of exporting items in JSON format. This one is the default formatter.
- pretty_print(bool)
- If set to True, items will be exported with an ident of 2 and keys sorted, they will exported with a text line otherwise.
-
file_extension
= 'jl'¶
-
supported_options
= {'jsonlines': {'default': True, 'type': <type 'bool'>}, 'pretty_print': {'default': False, 'type': <type 'bool'>}}¶