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.4] - 2022-01-24

  • Improved serializability for enum classes

[0.1.3] - 2022-01-04

  • Fixed issues with version 0.1.2

[0.1.2] - 2021-12-29

  • Updated several fields with multiple types to fix issues with serialization and deserialization. For example, the coordinates on Poly2d objects were previously always parsed to strings. This update means that an attempt to parse them to floats is made. If this fails the they will be parsed to strings.

[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.4.tar.gz (28.4 kB view details)

Uploaded Source

Built Distribution

annotell_openlabel-0.1.4-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: annotell-openlabel-0.1.4.tar.gz
  • Upload date:
  • Size: 28.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for annotell-openlabel-0.1.4.tar.gz
Algorithm Hash digest
SHA256 e81f82b4c766f50a145afd6ddd50c032d8d850288672e3f2f9cd0985027cf7c8
MD5 075e27921ddf0d49acbc332288ab32aa
BLAKE2b-256 9e4ab02198d5018f59d2798d2e507c37b2c19e1cf4ca526f8fe2ea68c52258ae

See more details on using hashes here.

File details

Details for the file annotell_openlabel-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: annotell_openlabel-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.2

File hashes

Hashes for annotell_openlabel-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4c13f6cad3efc2f9728d41df6d8eddcc3257d28359f9c70e7001503b3ccef568
MD5 c42b2117d73d26bd3785443faf406d81
BLAKE2b-256 0b33fbb71bb1474008ce7212121fad74b5ff1bbbb7786eb1c789003f65b286ea

See more details on using hashes here.

Supported by

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