nucleus.track¶
A track is a class of objects (annotation or prediction) that forms a one-to-many relationship |
- class nucleus.track.Track¶
A track is a class of objects (annotation or prediction) that forms a one-to-many relationship with objects, wherein an object is an instance of a track.
- Parameters:
reference_id (str) – A user-specified name of the track that describes the class of objects it represents.
metadata – Arbitrary key/value dictionary of info to attach to this track.
- classmethod from_json(payload, connection)¶
Instantiates track object from schematized JSON dict payload.
- Parameters:
payload (dict)
connection (nucleus.Connection)
- to_json()¶
Serializes track object to schematized JSON string.
- Return type:
str
- to_payload()¶
Serializes track object to schematized JSON dict.
- Return type:
dict
- update(metadata=None, overwrite_metadata=False)¶
Updates the Track’s metadata.
- Parameters:
metadata (Optional[dict]) – An arbitrary dictionary of additional data about this track that can be stored and retrieved.
overwrite_metadata (Optional[bool]) – If metadata is provided and overwrite_metadata = True, then the track’s entire metadata object will be overwritten. Otherwise, only the keys in metadata will be overwritten.
- Return type:
None