# MaLo Ident Python Models
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/maloident.svg)
![Pypi status badge](https://img.shields.io/pypi/v/maloident)
![Unittests status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Unittests/badge.svg)
![Coverage status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Coverage/badge.svg)
![Linting status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Linting/badge.svg)
![Black status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Formatting/badge.svg)
This package provides mostly autogenerated [pydantic](https://docs.pydantic.dev/latest/)-based model classes for the MaLo ident API.
We also maintain a [C#/.NET Version of this data model](https://github.com/Hochfrequenz/malo-ident-net-models).
It does not provide you with an HTTP client.
## Installation
Install it from [PyPI](https://pypi.org/project/maloident)
```bash
pip install maloident
```
Then use it:
```python
from maloident.v1.models import ResultNegative
my_json = {
"decisionTree": "E_0594",
"responseCode": "A10",
"reason": "Ich bin ein Freitext.",
"networkOperator": 9900987654321,
}
result = ResultNegative.model_validate(my_json)
```
The request payload type for the Lieferant➡️Netzbetreiber identification request is `maloident.models.IdentificationParameter`.
See the [tests](unittests/test_models.py) for more examples.
## Project Structure
This project is based on [`datamodel-code-generator`](https://github.com/koxudaxi/datamodel-code-generator/).
Most of the classes are autogenerated from the [`openapi.yml`](openapi/v1/openapi.yml) which can be found on [SwaggerHub](https://app.swaggerhub.com/apis/edi-energy/MaLoIdent_2024-07-03/v1.0.0).
Note that we fixed some errors in the official OpenAPI spec.
Our changes are mentioned at the beginning of the [`openapi.yml`](openapi/v1/openapi.yml) file.
https://github.com/Hochfrequenz/malo-ident-python-models/blob/3cfe0aea3cff051303ef5e513d06ab6c5741f21a/openapi/openapi.yml#L4-L10
After updating the `openapi.yml` file, use
```bash
tox -e codegen
```
to re-generate the model classes.
## Contribute
You are very welcome to contribute to this template repository by opening a pull request against the main branch.
Raw data
{
"_id": null,
"home_page": null,
"name": "maloident",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "BDEW, MaLo, MaLo Ident, Marktlokation",
"author": null,
"author_email": "your name <info+github@hochfrequenz.de>",
"download_url": "https://files.pythonhosted.org/packages/97/95/7c35c24aa482eb0055e3cc79eff27a479a1dd82c85bbbf9e2f381d99da11/maloident-2024.7.3.6.tar.gz",
"platform": null,
"description": "# MaLo Ident Python Models\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)\n![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/maloident.svg)\n![Pypi status badge](https://img.shields.io/pypi/v/maloident)\n![Unittests status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Unittests/badge.svg)\n![Coverage status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Coverage/badge.svg)\n![Linting status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Linting/badge.svg)\n![Black status badge](https://github.com/Hochfrequenz/malo-ident-python-models/workflows/Formatting/badge.svg)\n\nThis package provides mostly autogenerated [pydantic](https://docs.pydantic.dev/latest/)-based model classes for the MaLo ident API.\n\nWe also maintain a [C#/.NET Version of this data model](https://github.com/Hochfrequenz/malo-ident-net-models).\n\nIt does not provide you with an HTTP client.\n\n## Installation\n\nInstall it from [PyPI](https://pypi.org/project/maloident)\n\n```bash\npip install maloident\n```\n\nThen use it:\n\n```python\nfrom maloident.v1.models import ResultNegative\n\nmy_json = {\n \"decisionTree\": \"E_0594\",\n \"responseCode\": \"A10\",\n \"reason\": \"Ich bin ein Freitext.\",\n \"networkOperator\": 9900987654321,\n}\nresult = ResultNegative.model_validate(my_json)\n```\n\nThe request payload type for the Lieferant\u27a1\ufe0fNetzbetreiber identification request is `maloident.models.IdentificationParameter`.\n\nSee the [tests](unittests/test_models.py) for more examples.\n\n## Project Structure\n\nThis project is based on [`datamodel-code-generator`](https://github.com/koxudaxi/datamodel-code-generator/).\nMost of the classes are autogenerated from the [`openapi.yml`](openapi/v1/openapi.yml) which can be found on [SwaggerHub](https://app.swaggerhub.com/apis/edi-energy/MaLoIdent_2024-07-03/v1.0.0).\n\nNote that we fixed some errors in the official OpenAPI spec.\nOur changes are mentioned at the beginning of the [`openapi.yml`](openapi/v1/openapi.yml) file.\n\nhttps://github.com/Hochfrequenz/malo-ident-python-models/blob/3cfe0aea3cff051303ef5e513d06ab6c5741f21a/openapi/openapi.yml#L4-L10\n\nAfter updating the `openapi.yml` file, use\n\n```bash\ntox -e codegen\n```\n\nto re-generate the model classes.\n\n## Contribute\n\nYou are very welcome to contribute to this template repository by opening a pull request against the main branch.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Model classes for the Marktlokation ID Identification API by EDI@Energy (manually fixed)",
"version": "2024.7.3.6",
"project_urls": {
"Changelog": "https://github.com/Hochfrequenz/malo-ident-python-models/releases",
"Homepage": "https://github.com/Hochfrequenz/malo-ident-python-models"
},
"split_keywords": [
"bdew",
" malo",
" malo ident",
" marktlokation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "884bbf23b0b7918a15209ed70dd37e9491a9d27f393cc04d63d23b69a67222f9",
"md5": "8b6eb4b0c45b9609e60d7606b3d674a7",
"sha256": "1c7e69b501a85025fa25d1e892c35beac31092773a22d23151077c71bf7028db"
},
"downloads": -1,
"filename": "maloident-2024.7.3.6-py3-none-any.whl",
"has_sig": false,
"md5_digest": "8b6eb4b0c45b9609e60d7606b3d674a7",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 9377,
"upload_time": "2024-11-15T10:31:28",
"upload_time_iso_8601": "2024-11-15T10:31:28.274354Z",
"url": "https://files.pythonhosted.org/packages/88/4b/bf23b0b7918a15209ed70dd37e9491a9d27f393cc04d63d23b69a67222f9/maloident-2024.7.3.6-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "97957c35c24aa482eb0055e3cc79eff27a479a1dd82c85bbbf9e2f381d99da11",
"md5": "c9eec30029ff7359dc8fdc20a78adf23",
"sha256": "ccf1bd1d434a961cfd67a149a692d47f203a98e16240151852522c79bbe6f8ad"
},
"downloads": -1,
"filename": "maloident-2024.7.3.6.tar.gz",
"has_sig": false,
"md5_digest": "c9eec30029ff7359dc8fdc20a78adf23",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 19441,
"upload_time": "2024-11-15T10:31:29",
"upload_time_iso_8601": "2024-11-15T10:31:29.653666Z",
"url": "https://files.pythonhosted.org/packages/97/95/7c35c24aa482eb0055e3cc79eff27a479a1dd82c85bbbf9e2f381d99da11/maloident-2024.7.3.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-15 10:31:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Hochfrequenz",
"github_project": "malo-ident-python-models",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "annotated-types",
"specs": [
[
"==",
"0.7.0"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.9.2"
]
]
},
{
"name": "pydantic-core",
"specs": [
[
"==",
"2.23.4"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.12.2"
]
]
}
],
"tox": true,
"lcname": "maloident"
}