> This page is for version v0.24.1.
> For other versions, use one of these documentation indexes:
> - Latest (default): https://docs.nvidia.com/nemo/guardrails/latest/llms.txt
> - v0.24.1: https://docs.nvidia.com/nemo/guardrails/v0.24.1/llms.txt
> - v0.24.0: https://docs.nvidia.com/nemo/guardrails/v0.24.0/llms.txt
> - v0.23.0: https://docs.nvidia.com/nemo/guardrails/v0.23.0/llms.txt
> - v0.22.0: https://docs.nvidia.com/nemo/guardrails/v0.22.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nemo/guardrails/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nemo/guardrails/_mcp/server.

# nemoguardrails.server.datastore.memory_store

## Module Contents

### Classes

| Name                                                                       | Description                                     |
| -------------------------------------------------------------------------- | ----------------------------------------------- |
| [`MemoryStore`](#nemoguardrails-server-datastore-memory_store-MemoryStore) | A datastore implementation using a simple dict. |

### API

```python
class nemoguardrails.server.datastore.memory_store.MemoryStore()
```

**Bases:** [DataStore](/guardrails-python-sdk/nemoguardrails/server/datastore/datastore#nemoguardrails-server-datastore-datastore-DataStore)

A datastore implementation using a simple dict.

**`data`** `= {}`

---

```python
nemoguardrails.server.datastore.memory_store.MemoryStore.get(
    key: str
) -> typing.Optional[str]
```

async

Return the value for the specified key.
Args:
key: The key to lookup.

**Returns:** `Optional[str]`

None if the key does not exist.

```python
nemoguardrails.server.datastore.memory_store.MemoryStore.set(
    key: str,
    value: str
)
```

async

Save data into the datastore.

**Parameters:**

**`key`** `str`

The key to use.

---

**`value`** `str`

The value associated with the key.

---

**Returns:**

None