nemoguardrails.server.datastore.datastore

View as Markdown

Module Contents

Classes

NameDescription
DataStoreA basic data store interface.

API

class nemoguardrails.server.datastore.datastore.DataStore()

A basic data store interface.

nemoguardrails.server.datastore.datastore.DataStore.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.

nemoguardrails.server.datastore.datastore.DataStore.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