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.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.0.tar.gz
(12.5 kB
view hashes)
Built Distribution
Close
Hashes for annotell_openlabel-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50a830bf29d6ffdef97f87c444175d0a415df01b90bfd594fd97c6342d847971 |
|
MD5 | bb73464af0e5ee1cfa0bbf8bd89139e8 |
|
BLAKE2b-256 | fd329185254c40fd5dad3030763ef94fc4c2f169c494ced68bb532e2da73dc82 |