Name | kognic-openlabel JSON |
Version |
2.0.3
JSON |
| download |
home_page | None |
Summary | Kognic OpenLABEL Datamodel |
upload_time | 2024-07-26 08:46:51 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.7 |
license | MIT |
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.2] - 2024-07-26
- Fix so that `model_dump` works correctly with ontologies
## [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": null,
"name": "kognic-openlabel",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "Kognic, OpenLABEL",
"author": null,
"author_email": "Kognic <new-annotation@kognic.com>",
"download_url": "https://files.pythonhosted.org/packages/5b/8c/7f89a7855d78a27a0272594928dfff24142be0087ca6d3a4afe25ad17ebe/kognic_openlabel-2.0.3.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.2] - 2024-07-26\n- Fix so that `model_dump` works correctly with ontologies\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.3",
"project_urls": {
"homepage": "https://github.com/annotell/kognic-openlabel-python"
},
"split_keywords": [
"kognic",
" openlabel"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5c435bd88830114bc42950fdc4ce2cbfb4ebdd8b1bd10278f14a168cfbb4df77",
"md5": "c9638286efadf37a04fb60156e0119b8",
"sha256": "3a0a36a5eacb89a40186c39c48d2ba0c26eb777b23143c4ed3486a37f2498f71"
},
"downloads": -1,
"filename": "kognic_openlabel-2.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c9638286efadf37a04fb60156e0119b8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 30246,
"upload_time": "2024-07-26T08:46:50",
"upload_time_iso_8601": "2024-07-26T08:46:50.431147Z",
"url": "https://files.pythonhosted.org/packages/5c/43/5bd88830114bc42950fdc4ce2cbfb4ebdd8b1bd10278f14a168cfbb4df77/kognic_openlabel-2.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b8c7f89a7855d78a27a0272594928dfff24142be0087ca6d3a4afe25ad17ebe",
"md5": "b4323b4b180f88444e204cc76e776c2e",
"sha256": "6ffde11f8b2638f38e697a8f17783fbc6ea988b748419f7f9613bf6d06899f8a"
},
"downloads": -1,
"filename": "kognic_openlabel-2.0.3.tar.gz",
"has_sig": false,
"md5_digest": "b4323b4b180f88444e204cc76e776c2e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 32336,
"upload_time": "2024-07-26T08:46:51",
"upload_time_iso_8601": "2024-07-26T08:46:51.962296Z",
"url": "https://files.pythonhosted.org/packages/5b/8c/7f89a7855d78a27a0272594928dfff24142be0087ca6d3a4afe25ad17ebe/kognic_openlabel-2.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-26 08:46:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "annotell",
"github_project": "kognic-openlabel-python",
"github_not_found": true,
"lcname": "kognic-openlabel"
}