Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

annotell_openlabel-0.1.1-py2.py3-none-any.whl (30.3 kB view details)

Uploaded Python 2Python 3

File details

Details for the file annotell-openlabel-0.1.1.tar.gz.

File metadata

  • Download URL: annotell-openlabel-0.1.1.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for annotell-openlabel-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1a50790701517374780f1e620a1ee3151c5cbebd0573f7ecaf82e788c4cfb59a
MD5 383820a7dbcd971431acfbd692c2c372
BLAKE2b-256 bd95694e94c5706983442e999d13d6eb0be49005006fbc4c5e4f797e55ea9213

See more details on using hashes here.

File details

Details for the file annotell_openlabel-0.1.1-py2.py3-none-any.whl.

File metadata

  • Download URL: annotell_openlabel-0.1.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.12

File hashes

Hashes for annotell_openlabel-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 aa0c1c7a78c27b9c5af3a25dbc04f5900b320358d62e4671425c325206130f58
MD5 18601efe9453f623beaace7aecb6caab
BLAKE2b-256 4341f5a2676e884933895e626ff031a9887af1cff7f6cc97b800c4a8a67ae04a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page