openwpm.storage.local_storage module

class openwpm.storage.local_storage.LocalArrowProvider(storage_path: Path)[source]

Bases: ArrowProvider

Stores Parquet files under storage_path/table_name/n.parquet

async write_table(table_name: TableName, table: Table) None[source]

Write out the table to persistent storage

This should only return once it’s actually saved out

class openwpm.storage.local_storage.LocalGzipProvider(storage_path: Path)[source]

Bases: UnstructuredStorageProvider

Stores files as storage_path/hash.zip

async flush_cache() None[source]

Blockingly write out any cached data to the respective storage

async init() None[source]

Initializes the StorageProvider for use

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

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