The csvimport module is accessible via the sqlobject.util module.
CSV files should have a header line that lists columns. Headers can also be appended with :type to indicate the type of the field. escaped is the default, though it can be overridden by the importer. Supported types:
You can also get back references to the objects if you have a special [name] column.
Any column named [comment] or with no name will be ignored.
In any column you can put [default] to exclude the value and use whatever default the class wants. [null] will use NULL.
Lines that begin with [comment] are ignored.
Create the data, which is the return value from load_csv(). Classes will be resolved with the callable class_getter; or if class_getter is a module then the class names will be attributes of that.
Returns a dictionary of {object_name: object(s)}, using the names from the [name] columns (if there are any). If a name is used multiple times, you get a list of objects, not a single object.
If keyorder is given, then the keys will be retrieved in that order. It can be a list/tuple of names, or a sorting function. If not given and class_getter is a module and has a soClasses function, then that will be used for the order.
Load the data from all the files in a directory. Filenames indicate the class, with general.csv for data not associated with a class. Return data just like load_csv does.
This might cause problems on case-insensitive filesystems.
Loads the CSV file, returning a list of dictionaries with types coerced.
See the source for more information.