Metadata-Version: 2.3
Name: maloident
Version: 0.0.3
Summary: Model classes for the Marktlokation ID Identification API by EDI@Energy (manually fixed)
Project-URL: Changelog, https://github.com/Hochfrequenz/malo-ident-python-models/releases
Project-URL: Homepage, https://github.com/Hochfrequenz/malo-ident-python-models
Author-email: your name <info+github@hochfrequenz.de>
License: MIT
License-File: LICENSE
Keywords: BDEW,MaLo,MaLo Ident,Marktlokation
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: pydantic>=2
Provides-Extra: codegen
Requires-Dist: datamodel-code-generator==0.26.0; extra == 'codegen'
Provides-Extra: coverage
Requires-Dist: coverage==7.6.1; extra == 'coverage'
Provides-Extra: dev
Requires-Dist: pip-tools; extra == 'dev'
Provides-Extra: formatting
Requires-Dist: black==24.8.0; extra == 'formatting'
Requires-Dist: isort==5.13.2; extra == 'formatting'
Provides-Extra: linting
Requires-Dist: pylint==3.3.1; extra == 'linting'
Provides-Extra: packaging
Requires-Dist: build==1.2.2; extra == 'packaging'
Requires-Dist: twine==5.1.1; extra == 'packaging'
Provides-Extra: spell-check
Requires-Dist: codespell==2.3.0; extra == 'spell-check'
Provides-Extra: tests
Requires-Dist: pytest==8.3.3; extra == 'tests'
Provides-Extra: type-check
Requires-Dist: mypy[pydantic]==1.11.2; extra == 'type-check'
Description-Content-Type: text/markdown

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

It does not provide you with an HTTP client.

## Installation
Install it from [PyPI](https://pypi.org/projects/maloident)
```bash
pip install maloident
```

Then use it:

```python
from maloident.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/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/openapi.yml) file.

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.
