BaseKeyValueStoreClient
Hierarchy
- BaseKeyValueStoreClient
Index
Methods
delete
Permanently delete the key-value store managed by this client.
Returns None
delete_record
Delete the specified record from the key-value store.
Parameters
key: str
The key of the record which to delete
Returns None
get
Get metadata about the key-value store being managed by this client.
Returns KeyValueStoreMetadata | None
get_public_url
Get the public URL for the given key.
Parameters
key: str
Key of the record for which URL is required.
Returns str
The public URL for the given key.
get_record
Retrieve the given record from the key-value store.
Parameters
key: str
Key of the record to retrieve
Returns KeyValueStoreRecord | None
The requested record, or None, if the record does not exist
get_record_as_bytes
Retrieve the given record from the key-value store, without parsing it.
Parameters
key: str
Key of the record to retrieve
Returns KeyValueStoreRecord[bytes] | None
The requested record, or None, if the record does not exist
list_keys
List the keys in the key-value store.
Parameters
keyword-onlylimit: int = 1000
Number of keys to be returned. Maximum value is 1000.
keyword-onlyexclusive_start_key: str | None = None
All keys up to this one (including) are skipped from the result.
Returns KeyValueStoreListKeysPage
The list of keys in the key-value store matching the given arguments.
set_record
Set a value to the given record in the key-value store.
Parameters
key: str
The key of the record to save the value to
value: Any
The value to save into the record
content_type: str | None = None
The content type of the saved value
Returns None
stream_record
Retrieve the given record from the key-value store, as a stream.
Parameters
key: str
Key of the record to retrieve
Returns AsyncContextManager[KeyValueStoreRecord[Response] | None]
The requested record as a context-managed streaming Response, or None, if the record does not exist
update
Update the key-value store metadata.
Parameters
keyword-onlyname: str | None = None
New new name for the key-value store.
Returns KeyValueStoreMetadata
An object reflecting the updated key-value store metadata.
Abstract base class for key-value store resource clients.
These clients are specific to the type of resource they manage and operate under a designated storage client, like a memory storage client.