pyrit.memory.CentralMemory#

class CentralMemory[source]#

Bases: object

Provide a centralized memory instance across the framework. The provided memory instance will be reused for future calls.

__init__()#

Methods

__init__()

get_memory_instance()

Return 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]#

Return a centralized memory instance.

Returns:

The singleton memory instance.

Return type:

MemoryInterface

Raises:

ValueError – If the central memory instance has not been set.

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.