def setUpClass(cls): cls.db = shelfdb.open('test_data/db')
def __init__(self, host='127.0.0.1', port=17000, db_name='db'): self.host = host self.port = port self.db_name = db_name self.shelfdb = shelfdb.open(db_name)
def setUpClass(cls): cls.db = shelfdb.open('test_data/db') cls.assertIsInstance(cls, cls.db, shelfdb.shelf.DB)
import shelfdb db = shelfdb.open('./data/db') db.shelf('users') db.shelf('countries') x = db.shelf("countries").filter(lambda u: u) for us in x: print(us)