langchain_community.storage.astradb.AstraDBByteStore¶

class langchain_community.storage.astradb.AstraDBByteStore(collection_name: str, token: Optional[str] = None, api_endpoint: Optional[str] = None, astra_db_client: Optional[Any] = None, namespace: Optional[str] = None)[source]¶

ByteStore implementation using DataStax AstraDB as the underlying store. The bytes values are converted to base64 encoded strings Documents in the AstraDB collection will have the format {

“_id”: “<key>”, “value”: “<byte64 string value>”

}

Methods

__init__(collection_name[, token, ...])

decode_value(value)

Decodes value from Astra DB

encode_value(value)

Encodes value for Astra DB

mdelete(keys)

Delete the given keys.

mget(keys)

Get the values associated with the given keys.

mset(key_value_pairs)

Set the given key-value pairs.

yield_keys(*[, prefix])

Yield keys in the store.

__init__(collection_name: str, token: Optional[str] = None, api_endpoint: Optional[str] = None, astra_db_client: Optional[Any] = None, namespace: Optional[str] = None) None¶
decode_value(value: Any) Optional[bytes][source]¶

Decodes value from Astra DB

encode_value(value: Optional[bytes]) Any[source]¶

Encodes value for Astra DB

mdelete(keys: Sequence[str]) None¶

Delete the given keys.

mget(keys: Sequence[str]) List[Optional[V]]¶

Get the values associated with the given keys.

mset(key_value_pairs: Sequence[Tuple[str, V]]) None¶

Set the given key-value pairs.

yield_keys(*, prefix: Optional[str] = None) Iterator[str]¶

Yield keys in the store.