Package itools :: Package csv

Package csv

Classes
  CSVFile
  Property
A property has a value, and may have one or more parameters.
  Record
  Row
  Table
  UniqueError
Raised when setting a value already used to a unique property.
Functions
 
deserialize_parameters(parameters, schema, default=<class 'itools.csv.table.[anonymous] from itools.datatypes.pri...)
 
escape_data(data)
Escape the data
 
fold_line(data)
Fold the unfolded line over 75 characters.
 
is_multilingual(datatype)
 
parse(data, columns=None, schema=None, guess=False, skip_header=False, encoding='UTF-8', **kw)
This method is a generator that returns one CSV row at a time.
 
parse_table(data)
This is the public interface of the module "itools.ical.parser", a low-level parser of iCalendar files.
 
property_to_str(name, property, datatype, p_schema, encoding='utf-8')
This method serializes the given property to a byte string:
Function Details

parse(data, columns=None, schema=None, guess=False, skip_header=False, encoding='UTF-8', **kw)

 
This method is a generator that returns one CSV row at a time. To do the job it wraps the standard Python's csv parser.

parse_table(data)

 

This is the public interface of the module "itools.ical.parser", a low-level parser of iCalendar files.

The input is the data to be parsed (a byte strings), the output is a sequence of tuples:

name, value {param_name: param_value}

Where all the elements ('name', 'value', 'param_name' and 'param_value') are byte strings.

property_to_str(name, property, datatype, p_schema, encoding='utf-8')

 

This method serializes the given property to a byte string:

name[;parameters]=value

The given datatype is used to serialize the property value. The given 'p_schema' describes the parameters.