def __init__(self, db_path, readonly=True, lock=False, readahead=False, **kwargs):
    try:
        import lmdb
    except ImportError:
        raise ImportError('Please install lmdb to enable LmdbBackend.')
    self.db_path = str(db_path)
    self._client = lmdb.open(self.db_path, readonly=readonly, lock=lock, readahead=readahead, **kwargs)
def __init__(self, db_path, readonly=True, lock=False, readahead=False, **kwargs):
    try:
        import lmdb
    except ImportError:
        raise ImportError('Please install lmdb to enable LmdbBackend.')
    self.db_path = str(db_path)
    self._client = lmdb.open(self.db_path, readonly=readonly, lock=lock, readahead=readahead, **kwargs)