import dolphindb as ddb class DDBBase(object): ddb_config = { 'host' : '192.168.1.167', 'username' : 'admin', 'password' : '123456', } def __init__(self): self.ddb_sess = ddb.session(self.ddb_config['host'], 8848) self.ddb_sess.login(self.ddb_config['username'], self.ddb_config['password'])