openwpm.storage.leveldb module

class openwpm.storage.leveldb.LevelDbProvider(db_path: Path)[source]

Bases: UnstructuredStorageProvider

content_batch: WriteBatch
async flush_cache() None[source]

Write out content batch to LevelDB database

async init() None[source]

Initializes the StorageProvider for use

Guaranteed to be called in the process the StorageController runs in.

ldb: DB
async shutdown() None[source]

Close all open resources After this method has been called no further calls should be made to the object

async store_blob(filename: str, blob: bytes, overwrite: bool = False) None[source]

Stores the given bytes under the provided filename