bids.layout.Tag¶
- class Tag(file, entity, value, dtype=None)[source]¶
Represents an association between a File and an Entity.
- Parameters
file (BIDSFile) – The associated BIDSFile.
entity (Entity) – The associated Entity.
value (json-serializable type) – The value to store for this file/entity pair. Must be of type str, int, float, bool, or any json-serializable structure.
dtype (str) – Optional type for the value field. If None, inferred from value. If passed, must be one of str, int, float, bool, or json. Any other value will be treated as json (and will fail if the value can’t be serialized to json).
- Attributes
- entity
- entity_name
- file
- file_path
- __init__(file, entity, value, dtype=None)¶
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
Methods
__init__
(file, entity, value[, dtype])A simple constructor that allows initialization from kwargs.
Attributes
entity
entity_name
file
file_path
metadata
registry