This package provides mostly autogenerated pydantic-based model classes for the MaLo ident API.
We also maintain a C#/.NET Version of this data model.
It does not provide you with an HTTP client.
Install it from PyPI
pip install maloidentThen use it:
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 for more examples.
This project is based on datamodel-code-generator.
Most of the classes are autogenerated from the openapi.yml which can be found on SwaggerHub.
Note that we fixed some errors in the official OpenAPI spec.
Our changes are mentioned at the beginning of the openapi.yml file.
malo-ident-python-models/openapi/openapi.yml
Lines 4 to 10 in 3cfe0ae
After updating the openapi.yml file, use
tox -e codegento re-generate the model classes.
You are very welcome to contribute to this template repository by opening a pull request against the main branch.