def connect(self, host=None): if host is None: self.pool = pybase.connect([self.config.host]) print "connecting to %s" %(self.config.host) else: self.pool = pybase.connect( [host]) print "connecting to %s" %(host) for name in schema: setattr(self, name.upper(), pybase.HTable(self.pool, name, schema[name], createIfNotExist=True, overwrite=False))
def connect(self, host=None): if host is None: self.pool = pybase.connect([self.config.host]) print "connecting to %s" % (self.config.host) else: self.pool = pybase.connect([host]) print "connecting to %s" % (host) for name in schema: setattr( self, name.upper(), pybase.HTable(self.pool, name, schema[name], createIfNotExist=True, overwrite=False))
def test(self): sys = pybase.connect([self.config.host]) print sys.getTableNames()