kognic-openlabel


Namekognic-openlabel JSON
Version 2.0.1 PyPI version JSON
download
home_page
SummaryKognic OpenLABEL Datamodel
upload_time2023-11-07 16:31:39
maintainer
docs_urlNone
author
requires_python>=3.7
licenseMIT
keywords kognic openlabel
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Kognic OpenLABEL

## Installation
Install the Kognic OpenLABEL package from pip with

    pip install kognic-openlabel

## Serialization and deserialization

Since all models inherit from `pydantic`'s `BaseModel`, serialization and deserialization from dicts or json strings are relatively straight forward. 

```py
data = {
    "openlabel": {
        "metadata": {
            "schema_version": "1.0.0"
        }
    }
}

import kognic.openlabel.models as OLM

# Deserialize dict
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate(data)

# Serialize to json
json_data = openlabel_annotation.model_dump_json(exclude_none=True)

# Deserialize json
openlabel_annotation = OLM.OpenLabelAnnotation.model_validate_json(json_data)

# Serialize to dict
dict_data = openlabel_annotation.model_dump(exclude_none=True)
```
    
## Further reading
https://www.asam.net/project-detail/asam-openlabel-v100/

# Changelog

## [2.0.1] - 2023-11-07
- Use `model_rebuild` instead of deprecated `update_forward_refs`

## [2.0.0] - 2023-11-06
- Bump pydantic to >2

## [1.0.1] - 2023-07-05
- Pin pydantic version to <2

## [1.0.0] - 2022-10-18
- Annotell becomes Kognic

## [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

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "kognic-openlabel",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "Kognic,OpenLABEL",
    "author": "",
    "author_email": "Kognic <new-annotation@kognic.com>",
    "download_url": "https://files.pythonhosted.org/packages/b6/ac/6549d4e6babae725c6319a8d80806865a054a66eddb26dc8f4afe070f485/kognic-openlabel-2.0.1.tar.gz",
    "platform": null,
    "description": "# Kognic OpenLABEL\n\n## Installation\nInstall the Kognic OpenLABEL package from pip with\n\n    pip install kognic-openlabel\n\n## Serialization and deserialization\n\nSince all models inherit from `pydantic`'s `BaseModel`, serialization and deserialization from dicts or json strings are relatively straight forward. \n\n```py\ndata = {\n    \"openlabel\": {\n        \"metadata\": {\n            \"schema_version\": \"1.0.0\"\n        }\n    }\n}\n\nimport kognic.openlabel.models as OLM\n\n# Deserialize dict\nopenlabel_annotation = OLM.OpenLabelAnnotation.model_validate(data)\n\n# Serialize to json\njson_data = openlabel_annotation.model_dump_json(exclude_none=True)\n\n# Deserialize json\nopenlabel_annotation = OLM.OpenLabelAnnotation.model_validate_json(json_data)\n\n# Serialize to dict\ndict_data = openlabel_annotation.model_dump(exclude_none=True)\n```\n    \n## Further reading\nhttps://www.asam.net/project-detail/asam-openlabel-v100/\n\n# Changelog\n\n## [2.0.1] - 2023-11-07\n- Use `model_rebuild` instead of deprecated `update_forward_refs`\n\n## [2.0.0] - 2023-11-06\n- Bump pydantic to >2\n\n## [1.0.1] - 2023-07-05\n- Pin pydantic version to <2\n\n## [1.0.0] - 2022-10-18\n- Annotell becomes Kognic\n\n## [0.1.4] - 2022-01-24\n- Improved serializability for enum classes\n\n## [0.1.3] - 2022-01-04\n- Fixed issues with version 0.1.2\n\n## [0.1.2] - 2021-12-29\n- Updated several fields with multiple types to fix issues with serialization and deserialization.\nFor example, the coordinates on `Poly2d` objects were previously always parsed to strings.\n  This update means that an attempt to parse them to floats is made. If this fails the they will be parsed to strings. \n\n## [0.1.1] - 2021-11-24\n- Updated stream properties model generation to be nicer to work with\n\n## [0.1.0] - 2021-11-18\n- Updated json schema and model to be true to the 1.0.0 release of openlabel. Previously it was based on the release-candidate\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Kognic OpenLABEL Datamodel",
    "version": "2.0.1",
    "project_urls": {
        "homepage": "https://github.com/annotell/kognic-openlabel-python"
    },
    "split_keywords": [
        "kognic",
        "openlabel"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "19d456aaf39c4ca69a5baa1290a4de1f92ec32ac1883b722948cb2404018bc57",
                "md5": "8969912f3650ebdf0081f959b7925f00",
                "sha256": "ad6beafaa264e10e89c583f0636a5837bccf4a02fa3ff4fd8a47cfca6f865856"
            },
            "downloads": -1,
            "filename": "kognic_openlabel-2.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "8969912f3650ebdf0081f959b7925f00",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 30200,
            "upload_time": "2023-11-07T16:31:37",
            "upload_time_iso_8601": "2023-11-07T16:31:37.579945Z",
            "url": "https://files.pythonhosted.org/packages/19/d4/56aaf39c4ca69a5baa1290a4de1f92ec32ac1883b722948cb2404018bc57/kognic_openlabel-2.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b6ac6549d4e6babae725c6319a8d80806865a054a66eddb26dc8f4afe070f485",
                "md5": "5c5f05d8f50044eceb178bfc5a4bcf28",
                "sha256": "982fd5ed4f9189c60dc02ebc8175f3ca1a628e92a8eab478a4f51ab86da59716"
            },
            "downloads": -1,
            "filename": "kognic-openlabel-2.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5c5f05d8f50044eceb178bfc5a4bcf28",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 32244,
            "upload_time": "2023-11-07T16:31:39",
            "upload_time_iso_8601": "2023-11-07T16:31:39.567684Z",
            "url": "https://files.pythonhosted.org/packages/b6/ac/6549d4e6babae725c6319a8d80806865a054a66eddb26dc8f4afe070f485/kognic-openlabel-2.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-07 16:31:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "annotell",
    "github_project": "kognic-openlabel-python",
    "github_not_found": true,
    "lcname": "kognic-openlabel"
}
        
Elapsed time: 0.17391s