Skip to main content

Fully typed, async client library for Technical Master Data Service (TMDS)

Project description

tmdsclient.py

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

This repository contains the package tmdsclient. It is an async, fully typed Python client for the Technical Master Data Service (TMDS).

Its features are handwritten and extended as we need them. So it is not autogenerated from the TMDS OpenAPI.

Installation

Install it from PyPI:

pip install tmdsclient

Usage

from yarl import URL
from tmdsclient import BasicAuthTmdsClient, BasicAuthTmdsConfig

tmds_config = BasicAuthTmdsConfig(
    server_url=URL("https://my-tmds.xtk-test.org/"),
    usr="my-usr",
    pwd="my-pwd",
)
client = BasicAuthTmdsClient(tmds_config)
netzvertrage = await client.get_netzvertraege_for_melo("DE1234567890123456789012345678901")

Even though we did not fully replicate the TMDS data model (mainly BO4E.net + some wrapper classes), we tried to make the client as flexible as possible. You can use any unmapped field returned by TMDS by using the model_extra property of pydantic.

Development

For development of this library, follow the instructions in our Python Template Repository. tl;dr: tox -e dev will set up a development environment for you.

Release (CI/CD)

To release a new version of this library, create a new release in GitHub. Make sure its tag starts with v and the version number, e.g. v1.2.3. Releases are not restricted to the main branch, but we prefer them to happen there.

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

tmdsclient-0.5.2.tar.gz (24.2 kB view details)

Uploaded Source

Built Distribution

tmdsclient-0.5.2-py3-none-any.whl (25.3 kB view details)

Uploaded Python 3

File details

Details for the file tmdsclient-0.5.2.tar.gz.

File metadata

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

File hashes

Hashes for tmdsclient-0.5.2.tar.gz
Algorithm Hash digest
SHA256 2f2c03237c2f8ba23172bdf962c7eee4cb2e1b40fb32becb1c65b23815157aaf
MD5 e4772e38984412881d39d55cfffac011
BLAKE2b-256 8e36342d8cf71c5a73ebbb311f9625186bd6bcf0615942d352b53dd294892df5

See more details on using hashes here.

File details

Details for the file tmdsclient-0.5.2-py3-none-any.whl.

File metadata

  • Download URL: tmdsclient-0.5.2-py3-none-any.whl
  • Upload date:
  • Size: 25.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for tmdsclient-0.5.2-py3-none-any.whl
Algorithm Hash digest
SHA256 590af3c20d31dc0c40c880304b61a3bea4ff549383cdb7448a7de57e10f92b17
MD5 426aa8bc72bf5415656430bfd124af88
BLAKE2b-256 01cef6ddc5fb48ed591420908d74298e4355a31436cb9f068096cad41507d37f

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