Module ExampleModule :: Class ExampleConverter
[hide private]

Class ExampleConverter

source code

An example showing how to convert data from one type to another

If you define your own DataType then you should define one or more converter (methods) for it, because it is likely that other DataSources, such as the ones that ship with conduit will not know how to deal with the new DataType.

Instance Methods [hide private]
 
__init__(self)
Fills out the required self.conversions dict
source code
 
exampledata_to_file(self, data, **kwargs)
Converts exampledata to a file containing the text
source code
Instance Variables [hide private]
  self.conversions
A dictionary mapping conversions to functions which perform the conversion
Method Details [hide private]

__init__(self)
(Constructor)

source code 

Fills out the required self.conversions dict

Simply provide a list of conversions and associated functions in the following formatt:
   self.conversions =  {    
                       "from_type_name,to_type_name" : convert_function
                       }