metadata¤
Provides information about data.
Metadata ¤
Metadata(*, read_only, node_name, **kwargs)
Bases: FreezableMap[Any]
Provides information about data.
Warning
Do not instantiate directly. A Metadata object is created automatically when create_dataset or create_group is called.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
read_only
|
bool
|
Whether Metadata is initialised in read-only mode. |
required |
node_name
|
str
|
The name of the node that the Metadata is associated with. |
required |
kwargs
|
Any
|
All other keyword arguments are used to create the mapping. |
{}
|
Source code in src/msl/io/metadata.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
|
clear ¤
clear()
Maybe remove all items from the map, only if the map is not in read-only mode.
Source code in src/msl/io/freezable.py
58 59 60 61 |
|
copy ¤
copy(*, read_only=None)
Create a copy of the Metadata.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
read_only
|
bool | None
|
Whether the copy should be created in read-only mode.
If |
None
|
Returns:
Type | Description |
---|---|
Metadata
|
A copy of the Metadata. |
Source code in src/msl/io/metadata.py
145 146 147 148 149 150 151 152 153 154 155 156 157 |
|
fromkeys ¤
fromkeys(seq, value=None, *, read_only=None)
Create a new Metadata object with keys from seq
and values set to value
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
seq
|
Iterable[str]
|
Any iterable object that contains the names of the keys. |
required |
value
|
Any
|
The default value to use for each key. |
None
|
read_only
|
bool | None
|
None
|
Returns:
Type | Description |
---|---|
Metadata
|
A new Metadata object. |
Source code in src/msl/io/metadata.py
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 |
|
items ¤
items()
keys ¤
keys()
values ¤
values()
ValuesView[VT] — Returns a view of the map's values.
Source code in src/msl/io/freezable.py
67 68 69 |
|