def __init__(self, database, synchronous=False): ''' :param database: The database client to issue the write with. :param synchronous: True to make the put to disk synchronous, False to buffer ''' self.write_batch = LDB.leveldb_writebatch_create() self.database = database self.synchronous = synchronous