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.
Install it from PyPI:
pip install tmdsclient
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.
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.
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.
You are very welcome to contribute to this template repository by opening a pull request against the main branch.