"""Interfaces for waeup.csvfile. """ from zope.interface import Interface from zope import schema class ICSVFile(Interface): """A wrapper for a CSV file. """ required_fields = schema.List( title = u'Required header fields.', value_type = schema.TextLine( title = u'Field name', ) ) path = schema.TextLine( title = u'Filesystem path to wrapped file.' ) def getData(): """Get a dict of data contained in the CSV file. """ def getHeaderFields(): """Get a list of (supported) header fields. """ class ICSVDataReceiver(Interface): """A receiver for CSV data. """ def setData(data): """Set data. """ class ICSVDataConnector(Interface): """A connector brings together a CSVDataSource and a CSVDataReceiver. """