Skip to main content

Model classes for the Verzeichnisdienst API by EDI@Energy

Project description

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

It does not provide you with an HTTP client.

Installation

Install it from PyPI

pip install verzeichnisdienst

Then use it:

from verzeichnisdienst.v1.models import ApiRecord

my_json = {
    "providerId": "1234567890123",
    "apiId": "example",
    "majorVersion": 1,
    "url": "https://www.example.org/api/resource/v1",
    "additionalMetadata": None,
    "lastUpdated": "2024-10-01T00:00:00+00:00",
    "revision": 1,
    "status": "Test",
}
my_strongly_typed_record = ApiRecord.model_validate(my_json)

or

from verzeichnisdienst.v1.websocket import Contact

my_json_contact = {
    "email": "verzeichnis@hochfrequenz.de",
    "phone": "0049123457890"
}
my_strongly_typed_contact = Contact.model_validate(my_json_contact)

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.

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

verzeichnisdienst-0.1.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verzeichnisdienst-0.1.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file verzeichnisdienst-0.1.0.tar.gz.

File metadata

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

File hashes

Hashes for verzeichnisdienst-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fd3a663221f8a69d4b4bc3f967b2a79224a447b0f4e288965de3682442c82eaf
MD5 cf2a81591bae42eed1af543fc5288ed6
BLAKE2b-256 2c9a0ceb2125602d3e6eaae669f58f5636cc77e3092b8299836db396807d84d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for verzeichnisdienst-0.1.0.tar.gz:

Publisher: python-publish.yml on Hochfrequenz/verzeichnisdienst-python-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file verzeichnisdienst-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for verzeichnisdienst-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 455a88bc665565dab1d2229dfcee9a3dc35b0068fd320531cc7529e213704297
MD5 9976e138024c9b209d429a3f19849d9b
BLAKE2b-256 f1af16acaeca582fcce7c48d5149ca162b01e106a5c32d811dccbcea16c8dc1e

See more details on using hashes here.

Provenance

The following attestation bundles were made for verzeichnisdienst-0.1.0-py3-none-any.whl:

Publisher: python-publish.yml on Hochfrequenz/verzeichnisdienst-python-models

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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