| Name | Type | Description |
|---|---|---|
key* | str | The unique identifier for the item. |
namespace* | Sequence[str] | Optional list of strings representing the namespace path. |
refresh_ttl | bool | None | Default: NoneWhether to refresh the TTL on this read operation. If |
headers | Mapping[str, str] | None | Default: None |
Retrieve a single item.
client = get_sync_client(url="http://localhost:8123")
item = client.store.get_item(
["documents", "user123"],
key="item456",
)
print(item)
----------------------------------------------------------------
{
'namespace': ['documents', 'user123'],
'key': 'item456',
'value': {'title': 'My Document', 'content': 'Hello World'},
'created_at': '2024-07-30T12:00:00Z',
'updated_at': '2024-07-30T12:00:00Z'
}Optional custom headers to include with the request.