Beispiel #1
0
    def env(cls):
        from fxdayu_dataz.IO.environment import get_env
        from fxdayu_dataz.IO import MONGO

        mongo = get_env()[MONGO]
        return cls(create_client(mongo['client']), mongo['main'],
                   mongo['freq'])
Beispiel #2
0
    def check(self, freq, start=None, end=None):
        if freq is None:
            freq = get_env().freq
        else:
            freq = freq.split(',')

        for f in freq:
            self.multi('check')(f, start, end)
Beispiel #3
0
    def env(cls, code):
        env = get_env()

        return cls(env.file_root, code, env.freq)
Beispiel #4
0
 def env(cls, code):
     env = get_env()
     return cls(Master(env.file_root, code), env.db_manager[code])
Beispiel #5
0
 def env(cls):
     env = get_env()
     db = env.mongo[FREQ]["D"]["db"]
     return cls(env.db_manager.client[db])
Beispiel #6
0
 def set_fields(self, fields):
     if fields is not None:
         self.fields = fields.split(",")
     else:
         self.fields = get_env().market_index
Beispiel #7
0
    def env(cls, code):
        from fxdayu_dataz.IO.environment import get_env

        return cls(get_env().file_root, code)
Beispiel #8
0
    def env(cls, code):
        env = get_env()

        return cls(Freq(env.file_root, code, env.freq), env.db_manager)
Beispiel #9
0
 def __init__(self):
     self.env = get_env()
Beispiel #10
0
 def __init__(self):
     self.field = list()
     self.writer = Writer()
     self.env = get_env()