tensorstore.Context.__getitem__(self, key: str) Context.Resource

Creates or retrieves the context resource for the given key.

This is primarily useful for introspection of a context.

Example

>>> context = ts.Context(
...     {'cache_pool#a': {
...         'total_bytes_limit': 10000000
...     }})
>>> context['cache_pool#a']
Context.Resource({'total_bytes_limit': 10000000})
>>> context['cache_pool']
Context.Resource({})
Parameters:
key: str

Resource key, of the form '<resource-type>' or <resource-type>#<id>.

Returns:

The resource handle.