Skip to content

Content Format module

Reference to the content_format.py module.

content_format

Module for handling content formats of an app's input and output.

CLASS DESCRIPTION
ContentFormat

Format of the content of an app's input and output. This is used to specify how the app should read and write data.

ContentFormat

Bases: str, Enum

Format of the content of an app's input and output. This is used to specify how the app should read and write data.

You can import the ContentFormat class directly from nextmv:

from nextmv import ContentFormat
ATTRIBUTE DESCRIPTION
JSON

JSON format, utf-8 encoded.

TYPE: str

MULTI_FILE

Multi-file format, used for loading multiple files in a single input.

TYPE: str

JSON class-attribute instance-attribute

JSON = 'json'

JSON format, utf-8 encoded. JSON is read from stdin and written to stdout.

MULTI_FILE class-attribute instance-attribute

MULTI_FILE = 'multi-file'

Multi-file format. Read/write one or more files from/to disk (a directory).

description property

description: str

A human-friendly description of the content format.

InputFormat

Bases: str, Enum

Warning

InputFormat is deprecated, use nextmv.ContentFormat instead.

Format of an Input.

You can import the InputFormat class directly from nextmv:

from nextmv import InputFormat

This enum specifies the supported formats for input data.

ATTRIBUTE DESCRIPTION
JSON

Warning

InputFormat.JSON is deprecated, use ContentFormat.JSON instead.

JSON format, utf-8 encoded.

TYPE: str

TEXT

Warning

InputFormat.TEXT is deprecated, use ContentFormat.MULTI_FILE instead.

Text format, utf-8 encoded.

TYPE: str

CSV_ARCHIVE

Warning

InputFormat.CSV_ARCHIVE is deprecated, use ContentFormat.MULTI_FILE instead.

CSV archive format: multiple CSV files.

TYPE: str

MULTI_FILE

Warning

InputFormat.MULTI_FILE is deprecated, use ContentFormat.MULTI_FILE instead.

Multi-file format, used for loading multiple files in a single input.

TYPE: str

JSON class-attribute instance-attribute

JSON = 'json'

Warning

InputFormat.JSON is deprecated, use ContentFormat.JSON instead.

JSON format, utf-8 encoded.

TEXT class-attribute instance-attribute

TEXT = 'text'

Warning

InputFormat.TEXT is deprecated, use ContentFormat.MULTI_FILE instead.

Text format, utf-8 encoded.

CSV_ARCHIVE class-attribute instance-attribute

CSV_ARCHIVE = 'csv-archive'

Warning

InputFormat.CSV_ARCHIVE is deprecated, use ContentFormat.MULTI_FILE instead.

CSV archive format: multiple CSV files.

MULTI_FILE class-attribute instance-attribute

MULTI_FILE = 'multi-file'

Warning

InputFormat.MULTI_FILE is deprecated, use ContentFormat.MULTI_FILE instead.

Multi-file format, used for loading multiple files in a single input.