Skip to main content

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

Metadata

Release files for annotell-openlabel 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for annotell-openlabel 0.1.4
File Size Uploaded
annotell-openlabel-0.1.4.tar.gz 28.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for annotell-openlabel 0.1.4
File Interpreter ABI Platform
annotell_openlabel-0.1.4-py3-none-any.whl Python 3 none any Details

Total release size: 58.9 kB

Release files / annotell-openlabel-0.1.4.tar.gz

Download URL annotell-openlabel-0.1.4.tar.gz
Size 28.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e81f82b4c766f50a145afd6ddd50c032d8d850288672e3f2f9cd0985027cf7c8
BLAKE2b-256 checksum
How to use checksums
9e4ab02198d5018f59d2798d2e507c37b2c19e1cf4ca526f8fe2ea68c52258ae
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / annotell_openlabel-0.1.4-py3-none-any.whl

Download URL annotell_openlabel-0.1.4-py3-none-any.whl
Size 30.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c13f6cad3efc2f9728d41df6d8eddcc3257d28359f9c70e7001503b3ccef568
BLAKE2b-256 checksum
How to use checksums
0b33fbb71bb1474008ce7212121fad74b5ff1bbbb7786eb1c789003f65b286ea
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

0.1.3

2 release files

0.1.2

1 release file

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page