Metadata-Version: 2.3
Name: tmdsclient
Version: 0.2.3rc1
Summary: Fully typed, async client library for Technical Master Data Service (TMDS)
Project-URL: Changelog, https://github.com/Hochfrequenz/tmdsclient.py/releases
Project-URL: Homepage, https://github.com/Hochfrequenz/tmdsclient.py
Author-email: Hochfreuqenz Unternehmensberatung GmbH <info+github@hochfrequenz.de>
License: MIT
License-File: LICENSE
Keywords: technical master data,tmds
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.11
Requires-Dist: aiohttp[speedups]>=3.9.5
Requires-Dist: bo4e>=202401.1.1
Requires-Dist: jsonpatch
Requires-Dist: more-itertools
Requires-Dist: pydantic>=2.0.0
Provides-Extra: coverage
Requires-Dist: coverage==7.6.0; extra == 'coverage'
Provides-Extra: formatting
Requires-Dist: black==24.8.0; extra == 'formatting'
Requires-Dist: isort==5.13.2; extra == 'formatting'
Provides-Extra: linting
Requires-Dist: pylint-pydantic==0.3.2; extra == 'linting'
Requires-Dist: pylint==3.2.6; extra == 'linting'
Provides-Extra: packaging
Requires-Dist: build==1.2.1; extra == 'packaging'
Requires-Dist: twine==5.1.1; extra == 'packaging'
Provides-Extra: spellcheck
Requires-Dist: codespell==2.3.0; extra == 'spellcheck'
Provides-Extra: tests
Requires-Dist: aioresponses==0.7.6; extra == 'tests'
Requires-Dist: pytest-asyncio==0.23.8; extra == 'tests'
Requires-Dist: pytest==8.3.2; extra == 'tests'
Provides-Extra: type-check
Requires-Dist: mypy[pydantic]==1.8.0; extra == 'type-check'
Requires-Dist: types-pytz==2024.1.0.20240203; extra == 'type-check'
Description-Content-Type: text/markdown

# tmdsclient.py
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
![Python Versions (officially) supported](https://img.shields.io/pypi/pyversions/tmdsclient.svg)
![Pypi status badge](https://img.shields.io/pypi/v/tmdsclient)
![Unittests status badge](https://github.com/Hochfrequenz/tmdsclient.py/workflows/Unittests/badge.svg)
![Coverage status badge](https://github.com/Hochfrequenz/tmdsclient.py/workflows/Coverage/badge.svg)
![Linting status badge](https://github.com/Hochfrequenz/tmdsclient.py/workflows/Linting/badge.svg)
![Black status badge](https://github.com/Hochfrequenz/tmdsclient.py/workflows/Formatting/badge.svg)

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](https://pypi.org/project/tmdsclient/):
```bash
pip install tmdsclient
```

## Usage
```python
from yarl import URL
from tmdsclient import TmdsClient, TmdsConfig

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

Even though we did not fully replicate the TMDS data model (mainly [BO4E.net](https://github.com/Hochfrequenz/BO4E-dotnet/) + 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](https://docs.pydantic.dev/latest/api/base_model/#pydantic.BaseModel.model_extra).

## Development
For development of this library, follow the instructions in our [Python Template Repository](https://github.com/Hochfrequenz/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](https://github.com/Hochfrequenz/tmdsclient.py/releases/new) 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.
