The Attributes class (zarr.attrs
)¶
-
class
zarr.attrs.
Attributes
(store, key='.zattrs', read_only=False, cache=True, synchronizer=None)¶ Class providing access to user attributes on an array or group. Should not be instantiated directly, will be available via the .attrs property of an array or group.
Parameters: store : MutableMapping
The store in which to store the attributes.
key : str, optional
The key under which the attributes will be stored.
read_only : bool, optional
If True, attributes cannot be modified.
cache : bool, optional
If True (default), attributes will be cached locally.
synchronizer : Synchronizer
Only necessary if attributes may be modified from multiple threads or processes.
-
__getitem__
(item)¶
-
__setitem__
(item, value)¶
-
__delitem__
(item)¶
-
__iter__
()¶
-
__len__
()¶
-
keys
()¶
-
asdict
()¶ Retrieve all attributes as a dictionary.
-
put
(d)¶ Overwrite all attributes with the key/value pairs in the provided dictionary d in a single operation.
-
update
(*args, **kwargs)¶ Update the values of several attributes in a single operation.
-
refresh
()¶ Refresh cached attributes from the store.
-