Skip to main content

Model classes for the Marktlokation ID Identification API by EDI@Energy (manually fixed)

Project description

MaLo Ident Python Models

License: MIT Python Versions (officially) supported Pypi status badge Unittests status badge Coverage status badge Linting status badge Black status badge

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.

Installation

Install it from PyPI

pip install maloident

Then use it:

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 for more examples.

Project Structure

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.

https://github.com/Hochfrequenz/malo-ident-python-models/blob/fe41321c74773336984a3517adc79b3ac4f43349/openapi/openapi.yml#L4-L8

After updating the openapi.yml file, use

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maloident-2024.7.3.2.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

maloident-2024.7.3.2-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file maloident-2024.7.3.2.tar.gz.

File metadata

  • Download URL: maloident-2024.7.3.2.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for maloident-2024.7.3.2.tar.gz
Algorithm Hash digest
SHA256 9fcd8ff59a70060e38e66a62de1eb80404161433bbd83cdf59e9ce759ad52f7c
MD5 f0dcdbd06b88ee5066b8291128a1f6d2
BLAKE2b-256 704d6b59b22cadddad3ed25529b1d710a8c913b03948543c4704d267ea929cf5

See more details on using hashes here.

File details

Details for the file maloident-2024.7.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for maloident-2024.7.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 115dc94ec8b75f81e709b9630ba8852cd1a4980c83dbb9b16f5877e2990b9bbd
MD5 4bdd58c601327a93a96f562840bc01ae
BLAKE2b-256 799db2fd9edb59e2475fdabaf93d797d5eb503cf1a926c9cdec796e8500979c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page