Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create async API clients #10

Merged
merged 3 commits into from
Dec 30, 2024
Merged

Conversation

RustyDust
Copy link
Contributor

Added async SonnenAPI client variants based on aiohttp:

  • AsyncSonnenBatterie - SonnenAPI v1, async
  • AsyncSonnenBatterieV2 - SonnenAPI v2, async

Important

The async versions require the session to be closed explicitly. So don't forget
to do a sb.logout() when no longer accessing the API / before ending your app.

All internal function calls stay the same for now.

Test cases have been expanded / added to test the new APIs

- `AsyncSonnenBatterie` - SonnenAPI v1, async
- `AsyncSonnenBatterieV2` - SonnenAPI v2, async

> [!IMPORTANT]
> The async versions require the session to be closed explicitly. So don't forget
> to do a `sb.logout()` when no longer accessing the API / before ending your app.

All internal function calls stay the same for now.

Test cases have been expanded / added to test the new APIs

Signed-off-by: Stefan Rubner <stefan@whocares.de>
Moved `const.py` to the respective directories so it will be included in the
pypi package again.

Signed-off-by: Stefan Rubner <stefan@whocares.de>
Signed-off-by: stefan <stefan@whocares.de>
@weltmeyer weltmeyer merged commit 091bbec into weltmeyer:master Dec 30, 2024
1 check passed
@RustyDust RustyDust deleted the create_async_api branch December 30, 2024 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants