nat.plugins.mysql.mysql_object_store#

Attributes#

Classes#

MySQLObjectStore

Implementation of ObjectStore that stores objects in a MySQL database.

Module Contents#

logger#
class MySQLObjectStore(
*,
bucket_name: str,
host: str,
port: int,
username: str | None,
password: str | None,
)#

Bases: nat.object_store.interfaces.ObjectStore

Implementation of ObjectStore that stores objects in a MySQL database.

_bucket_name#
_host#
_port#
_username#
_password#
_conn_pool: aiomysql.pool.Pool | None = None#
property _schema: str#
async put_object(key: str, item: nat.object_store.models.ObjectStoreItem)#
async upsert_object(key: str, item: nat.object_store.models.ObjectStoreItem)#
async get_object(key: str) nat.object_store.models.ObjectStoreItem#
async delete_object(key: str)#