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

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

Uploaded Source

Built Distribution

maloident-2024.7.3.4-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maloident-2024.7.3.4.tar.gz
  • Upload date:
  • Size: 19.4 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.4.tar.gz
Algorithm Hash digest
SHA256 98637241c23927fe5084a24bd3a6db6209bd1466ae7c058c588d18eca6afe156
MD5 2c29e97148e4984d7fccdc9edc6e1348
BLAKE2b-256 cf9c9b42ad2a71d4f3f3deaad7581391c7245cfdf11dc31d49bfc8b5d4cabf4a

See more details on using hashes here.

Provenance

The following attestation bundles were made for maloident-2024.7.3.4.tar.gz:

Publisher: python-publish.yml on Hochfrequenz/malo-ident-python-models

Attestations:

File details

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

File metadata

File hashes

Hashes for maloident-2024.7.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 436fa2897249163c7167d76769469bc3669f9cfa09df6a6331716f9e71a0ef2a
MD5 a4eeb3234750053e6b27aa4edc3fdc67
BLAKE2b-256 eabae0ff9b9611a7582848d6343cd2e7d441296635dec9b9f5795eaaed939e07

See more details on using hashes here.

Provenance

The following attestation bundles were made for maloident-2024.7.3.4-py3-none-any.whl:

Publisher: python-publish.yml on Hochfrequenz/malo-ident-python-models

Attestations:

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