semvec/pypi-packages huggingface dataset:
bssclient 0.3.0
Fully typed, async client library for Basic Supply Service (BSS)
License: MIT
Requires Python: >=3.11
Keywords: basic supply, bss

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

This repository contains the package `bssclient`.
It is an async, fully typed Python client for the Basic Supply Service (BSS).

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

## Installation
Install it [from PyPI](https://pypi.org/project/bssclient/):
```bash
pip install bssclient
```

## Usage

```python
from yarl import URL
from bssclient import bssclient, BssConfig

bss_config = BssConfig(
    server_url=URL("https://my-bss.xtk-test.org/"),
    usr="my-usr",
    pwd="my-pwd",
)
client = bssclient(bss_config)
ermittlungsauftraege = await client.get_all_ermittlungsauftraege()
```

Even though we did not fully replicate the BSS data model,
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/bssclient.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.