timeplus.csv

csv

This module defines csv source
:copyright: (c) 2022 by Timeplus
:license: Apache2, see LICENSE for more details.

View Source
 0"""
 1csv
 2
 3This module defines csv source  
 4:copyright: (c) 2022 by Timeplus  
 5:license: Apache2, see LICENSE for more details.  
 6"""
 7
 8from timeplus.base import Base
 9from timeplus.source import Source
10
11
12class CSVProperties(Base):
13    """
14    CSV properties
15    """
16
17    def __init__(self):
18        Base.__init__(self)
19        self.prop("type", "csv")
20
21    def path(self, *args):
22        return self.prop("path", *args)
23
24
25class CSVSource(Source):
26    """
27    CSV Source class
28    """
29
30    def __init__(self, env=None):
31        Source.__init__(self, env)
32        self.type("file")
33        self._properties = CSVProperties()
34        self.properties(self._properties)
35
36    def path(self, path):
37        self._properties.path(path)
38        self.properties(self._properties)
39        return self
#   class CSVProperties(timeplus.base.Base):
View Source
13class CSVProperties(Base):
14    """
15    CSV properties
16    """
17
18    def __init__(self):
19        Base.__init__(self)
20        self.prop("type", "csv")
21
22    def path(self, *args):
23        return self.prop("path", *args)

CSV properties

#   CSVProperties()
View Source
18    def __init__(self):
19        Base.__init__(self)
20        self.prop("type", "csv")
#   def path(self, *args):
View Source
22    def path(self, *args):
23        return self.prop("path", *args)
Inherited Members
timeplus.base.Base
prop
data
id
#   class CSVSource(timeplus.source.Source):
View Source
26class CSVSource(Source):
27    """
28    CSV Source class
29    """
30
31    def __init__(self, env=None):
32        Source.__init__(self, env)
33        self.type("file")
34        self._properties = CSVProperties()
35        self.properties(self._properties)
36
37    def path(self, path):
38        self._properties.path(path)
39        self.properties(self._properties)
40        return self

CSV Source class

#   CSVSource(env=None)
View Source
31    def __init__(self, env=None):
32        Source.__init__(self, env)
33        self.type("file")
34        self._properties = CSVProperties()
35        self.properties(self._properties)
#   def path(self, path):
View Source
37    def path(self, path):
38        self._properties.path(path)
39        self.properties(self._properties)
40        return self