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.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.3.tar.gz (13.0 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.3-py3-none-any.whl (30.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: annotell-openlabel-0.1.3.tar.gz
  • Upload date:
  • Size: 13.0 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.3.tar.gz
Algorithm Hash digest
SHA256 6f5574d649b37770ca82fb24e7a9cffcb0b6dc06ff9c6e22b1b6d1a2ecfffa8c
MD5 d4d8fbf7f9966c117fcfc2e8255a7645
BLAKE2b-256 23515e5c728bd7a1255ccc8fb4f6d1a91717b0aba7a7fcb444920a0c685f3e20

See more details on using hashes here.

File details

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

File metadata

  • Download URL: annotell_openlabel-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 30.4 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6046fd4d9309e8467590e5b9dabd0b2fe6bd96979e962d095da7eac3a111b23
MD5 cb192741e3280684ee970f63b12f4d34
BLAKE2b-256 4fd8ff58d2ca4c74f6cfe8e5bda0b39c3c8508062af79ae254d7ef2ef7054e55

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