pynenc.client_data_store.sqlite_client_data_store

SQLite-based client data store for cross-process testing.

Provides a SQLite-backed implementation that enables true cross-process data sharing for testing process runners.

Key components:

  • SQLiteClientDataStore: SQLite-backed client data store

… warning:: Designed for testing purposes only. Not recommended for production.

Module Contents

Classes

Tables

Table names for client data store, scoped by app_id.

SQLiteClientDataStore

SQLite-backed client data store for cross-process testing.

API

class pynenc.client_data_store.sqlite_client_data_store.Tables(app_id: str)[source]

Bases: pynenc.util.sqlite_utils.TableNames

Table names for client data store, scoped by app_id.

Initialization

class pynenc.client_data_store.sqlite_client_data_store.SQLiteClientDataStore(app: pynenc.app.Pynenc)[source]

Bases: pynenc.client_data_store.base_client_data_store.BaseClientDataStore

SQLite-backed client data store for cross-process testing.

Uses SQLite to allow multiple processes to share cached client data. Implements the three abstract methods from BaseClientDataStore.

… warning:: Designed for testing purposes only. Uses temporary SQLite files.

Initialization

Initialize with app reference.

Parameters:

app (Pynenc) – The Pynenc application instance

_init_tables() None[source]

Create the client_data table if it doesn’t exist.

conf() pynenc.conf.config_client_data_store.ConfigClientDataStoreSQLite

Get SQLite-specific configuration.

_store(key: str, value: str) None[source]

Store a key-value pair in SQLite.

_retrieve(key: str) str[source]

Retrieve a stored value by key.

Parameters:

key (str) – The reference key

Returns:

The stored serialized string

Raises:

KeyError – If key not found

_purge() None[source]

Clear all stored client data.