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/3cfe0aea3cff051303ef5e513d06ab6c5741f21a/openapi/openapi.yml#L4-L10

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.3.tar.gz (19.3 kB view details)

Uploaded Source

Built Distribution

maloident-2024.7.3.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maloident-2024.7.3.3.tar.gz
  • Upload date:
  • Size: 19.3 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.3.tar.gz
Algorithm Hash digest
SHA256 2f42e7951738ba3f914eb4d7e9e8abfc26f3fec940c77a39f19db6aafa101911
MD5 393243eaaaa385967cc958a50d7c81ff
BLAKE2b-256 773191603c1d6921e210f3d0d86aef760a0bedc3318565dec349b7284983b211

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maloident-2024.7.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 a1f8c7003bfcee6ded430cb6467dc78687ceff30b0ee38289876c36b9c61c6ea
MD5 ca760dbe11c8d15118c5cb289f6cee29
BLAKE2b-256 6c173ba3491d0439f0b174ad2de00546a0b45178ea0a2c374e790b3080012a7b

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