pyrit.memory.CentralMemory#

class CentralMemory[source]#

Bases: object

Provides a centralized memory instance across the framework. If a memory instance is passed, it will be reused for future calls. Otherwise, it uses AzureSQLMemory if configuration values are found, defaulting to DuckDBMemory if not.

__init__()#

Methods

__init__()

get_memory_instance()

Returns a centralized memory instance.

set_memory_instance(passed_memory)

Set a provided memory instance as the central instance for subsequent calls.

classmethod get_memory_instance() MemoryInterface[source]#

Returns a centralized memory instance. Initializes it to AzureSQLMemory if Azure SQL/Storage Account configuration values are found, otherwise defaults to DuckDBMemory.

classmethod set_memory_instance(passed_memory: MemoryInterface) None[source]#

Set a provided memory instance as the central instance for subsequent calls.

Parameters:

passed_memory (MemoryInterface) – The memory instance to set as the central instance.