mirror of
https://github.com/ChronosX88/medved.git
synced 2024-11-24 15:42:17 +00:00
23 lines
469 B
Python
23 lines
469 B
Python
import copy
|
|
|
|
from lib import Service
|
|
|
|
class Source(Service):
|
|
"""Base class for datasources"""
|
|
def __init__(self, thread, id, root):
|
|
super().__init__(thread, id, root)
|
|
self._logger.add_field('service', 'Source')
|
|
self._logger.add_field('vname', self.__class__.__name__)
|
|
|
|
self._item = {
|
|
'source': self._id,
|
|
'steps': {},
|
|
'data': {}
|
|
}
|
|
|
|
def _create(self):
|
|
return copy.deepcopy(self._item)
|
|
|
|
def _prepare(self, item):
|
|
pass
|