Annotell OpenLABEL Datamodel
Project description
Annotell OpenLABEL
Installation
Install the Annotell OpenLABEL package from pip with
pip install annotell-openlabel
Serialization and deserialization
Since all models inherit from pydantic
's BaseModel
, serialization and deserialization from dicts or json strings are relatively straight forward.
data = {
"openlabel": {
"metadata": {
"schema_version": "1.0.0"
}
}
}
import annotell.openlabel.models as OLM
# Deserialize dict
openlabel_annotation = OLM.OpenLabelAnnotation.parse_obj(data)
# Serialize to json
json_data = openlabel_annotation.json(exclude_none=True)
# Deserialize json
openlabel_annotation = OLM.OpenLabelAnnotation.parse_raw(json_data)
# Serialize to dict
dict_data = openlabel_annotation.dict(exclude_none=True)
Further reading
https://www.asam.net/project-detail/asam-openlabel-v100/
Changelog
[0.1.1] - 2021-11-24
- Updated stream properties model generation to be nicer to work with
[0.1.0] - 2021-11-18
- Updated json schema and model to be true to the 1.0.0 release of openlabel. Previously it was based on the release-candidate
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
annotell-openlabel-0.1.1.tar.gz
(12.6 kB
view hashes)
Built Distribution
Close
Hashes for annotell_openlabel-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aa0c1c7a78c27b9c5af3a25dbc04f5900b320358d62e4671425c325206130f58 |
|
MD5 | 18601efe9453f623beaace7aecb6caab |
|
BLAKE2b-256 | 4341f5a2676e884933895e626ff031a9887af1cff7f6cc97b800c4a8a67ae04a |