Skip to content

csv

Classes:

Attributes:

csv_serializer module-attribute

csv_serializer = CsvSerializer()

"CSV serializer with default options.

CsvOptions

Bases: TypedDict

Configuration for CSV serialization.

CsvSerializer

CsvSerializer(**options: Unpack[CsvOptions])

Bases: Serializer[Sequence, CsvOptions]

Serializer for CSV format.

Methods:

deserialize_config

deserialize_config(config: str) -> C

Deserialize the configuration from a JSON string.

deserialize_data

deserialize_data(
    content: SerializedData[CsvOptions],
) -> Sequence

Deserialize the given CSV data.

serialize_config

serialize_config(config: C) -> str

Serialize the configuration to a JSON string.

serialize_data

serialize_data(
    value: Sequence,
) -> SerializedData[CsvOptions]

Serialize the given value to CSV.