KeyValueStoreClient
Hierarchy
- BaseKeyValueStoreClient
- KeyValueStoreClient
Index
Methods
__init__
Parameters
optionalkeyword-onlymemory_storage_client: MemoryStorageClient
optionalkeyword-onlyid: str | None = None
optionalkeyword-onlyname: str | None = None
optionalkeyword-onlycreated_at: datetime | None = None
optionalkeyword-onlyaccessed_at: datetime | None = None
optionalkeyword-onlymodified_at: datetime | None = None
Returns None
delete
Permanently delete the key-value store managed by this client.
Returns None
delete_persisted_record
Delete the specified record from the key-value store.
Parameters
optionalkeyword-onlyrecord: KeyValueStoreRecord
Returns None
delete_record
Delete the specified record from the key-value store.
Parameters
optionalkeyword-onlykey: 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
optionalkeyword-onlykey: str
Key of the record for which URL is required.
Returns str
get_record
Retrieve the given record from the key-value store.
Parameters
optionalkeyword-onlykey: str
Key of the record to retrieve.
Returns KeyValueStoreRecord | None
get_record_as_bytes
Retrieve the given record from the key-value store, without parsing it.
Parameters
optionalkeyword-onlykey: str
Key of the record to retrieve.
Returns KeyValueStoreRecord[bytes] | None
list_keys
List the keys in the key-value store.
Parameters
optionalkeyword-onlylimit: int = 1000
Number of keys to be returned. Maximum value is 1000.
optionalkeyword-onlyexclusive_start_key: str | None = None
All keys up to this one (including) are skipped from the result.
Returns KeyValueStoreListKeysPage
persist_record
Persist the specified record to the key-value store.
Parameters
optionalkeyword-onlyrecord: KeyValueStoreRecord
Returns None
set_record
Set a value to the given record in the key-value store.
Parameters
optionalkeyword-onlykey: str
The key of the record to save the value to.
optionalkeyword-onlyvalue: Any
The value to save into the record.
optionalkeyword-onlycontent_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
optionalkeyword-onlykey: str
Key of the record to retrieve.
Returns AsyncContextManager[KeyValueStoreRecord[Response] | None]
update
Update the key-value store metadata.
Parameters
optionalkeyword-onlyname: str | None = None
New new name for the key-value store.
Returns KeyValueStoreMetadata
update_timestamps
Update the timestamps of the key-value store.
Parameters
optionalkeyword-onlyhas_been_modified: bool
Returns None
Properties
resource_directory
Get the resource directory for the client.
resource_info
Get the resource info for the key-value store client.
Subclient for manipulating a single key-value store.