12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- '''
- A module to hold the importer class
- '''
- class BaseImporter(object):
- """
- The base class which defines the action needed to import data
- to pwman database
- """
- def __init__(self):
- pass
- class CSVImporter(BaseImporter):
- """
- A reference implementation which imports a CSV to the pwman database
- """
- def __init__(self):
- pass
- class Importer(object):
- """
- The actual job runner which by default runs a csv importer instance.
- This could be changes by calling other instance which for example import
- from KeePass XML or other formats.
- """
- def __init__(self, invoke=CSVImporter):
- self.runner = invoke
- def run(self):
- self.runner()
|