toonapi


Nametoonapi JSON
Version 0.3.0 PyPI version JSON
download
home_pagehttps://github.com/frenck/python-toonapi
SummaryAsynchronous Python client for the Quby ToonAPI.
upload_time2023-10-20 08:01:50
maintainer
docs_urlNone
authorFranck Nijhof
requires_python
licenseMIT license
keywords toon quby eneco boxx engie electrabel viesgo toonapi api async client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python: Asynchronous Python client for the Quby ToonAPI

[![GitHub Release][releases-shield]][releases]
![Project Stage][project-stage-shield]
![Project Maintenance][maintenance-shield]
[![License][license-shield]](LICENSE.md)

[![Build Status][build-shield]][build]
[![Code Coverage][codecov-shield]][codecov]
[![Code Quality][code-quality-shield]][code-quality]

[![Sponsor Frenck via GitHub Sponsors][github-sponsors-shield]][github-sponsors]

[![Support Frenck on Patreon][patreon-shield]][patreon]

Asynchronous Python client for the Quby ToonAPI.

## About

An asynchronous python client for the Qubby ToonAPI to control Quby thermostats.

These thermostats are also sold as:

- Eneco Toon
- Engie Electrabel Boxx
- Viesgo

They all use the same API endpoint, thus this library can be used.

This library is created to support the integration in
[Home Assistant](https://www.home-assistant.io).

## Installation

```bash
pip install toonapi
```

## Usage

```python
import asyncio

from toonapi import Toon


async def main():
    """Show example on using the ToonAPI."""
    async with Toon(token="put-in-token-here") as toon:
        agreements = await toon.agreements()
        print(agreements)

        await toon.activate_agreement(agreement=agreements[0])

        status = await toon.update()
        print(status.gas_usage)
        print(status.thermostat)
        print(status.power_usage)


if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
```

## Changelog & Releases

This repository keeps a change log using [GitHub's releases][releases]
functionality. The format of the log is based on
[Keep a Changelog][keepchangelog].

Releases are based on [Semantic Versioning][semver], and use the format
of ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented
based on the following:

- ``MAJOR``: Incompatible or major changes.
- ``MINOR``: Backwards-compatible new features and enhancements.
- ``PATCH``: Backwards-compatible bugfixes and package updates.

## Contributing

This is an active open-source project. We are always open to people who want to
use the code or contribute to it.

We've set up a separate document for our
[contribution guidelines](CONTRIBUTING.md).

Thank you for being involved! :heart_eyes:

## Setting up development environment

In case you'd like to contribute, a `Makefile` has been included to ensure a
quick start.

```bash
make venv
source ./venv/bin/activate
make dev
```

Now you can start developing, run `make` without arguments to get an overview
of all make goals that are available (including description):

```bash
$ make
Asynchronous Python client for the Quby ToonAPI.

Usage:
  make help                            Shows this message.
  make dev                             Set up a development environment.
  make lint                            Run all linters.
  make lint-black                      Run linting using black & blacken-docs.
  make lint-flake8                     Run linting using flake8 (pycodestyle/pydocstyle).
  make lint-pylint                     Run linting using PyLint.
  make lint-mypy                       Run linting using MyPy.
  make test                            Run tests quickly with the default Python.
  make coverage                        Check code coverage quickly with the default Python.
  make install                         Install the package to the active Python's site-packages.
  make clean                           Removes build, test, coverage and Python artifacts.
  make clean-all                       Removes all venv, build, test, coverage and Python artifacts.
  make clean-build                     Removes build artifacts.
  make clean-pyc                       Removes Python file artifacts.
  make clean-test                      Removes test and coverage artifacts.
  make clean-venv                      Removes Python virtual environment artifacts.
  make dist                            Builds source and wheel package.
  make release                         Release build on PyP
  make venv                            Create Python venv environment.
```

## Authors & contributors

The original setup of this repository is by [Franck Nijhof][frenck].

For a full list of all authors and contributors,
check [the contributor's page][contributors].

## License

MIT License

Copyright (c) 2020 Franck Nijhof

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

[build-shield]: https://github.com/frenck/python-toonapi/workflows/Continuous%20Integration/badge.svg
[build]: https://github.com/frenck/python-toonapi/actions
[code-quality-shield]: https://img.shields.io/lgtm/grade/python/g/frenck/python-toonapi.svg?logo=lgtm&logoWidth=18
[code-quality]: https://lgtm.com/projects/g/frenck/python-toonapi/context:python
[codecov-shield]: https://codecov.io/gh/frenck/python-toonapi/branch/master/graph/badge.svg
[codecov]: https://codecov.io/gh/frenck/python-toonapi
[contributors]: https://github.com/frenck/python-toonapi/graphs/contributors
[frenck]: https://github.com/frenck
[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png
[github-sponsors]: https://github.com/sponsors/frenck
[keepchangelog]: http://keepachangelog.com/en/1.0.0/
[license-shield]: https://img.shields.io/github/license/frenck/python-toonapi.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2020.svg
[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png
[patreon]: https://www.patreon.com/frenck
[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg
[releases-shield]: https://img.shields.io/github/release/frenck/python-toonapi.svg
[releases]: https://github.com/frenck/python-toonapi/releases
[semver]: http://semver.org/spec/v2.0.0.html
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/frenck/python-toonapi",
    "name": "toonapi",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "toon,quby,eneco,boxx,engie,electrabel,viesgo,toonapi,api,async,client",
    "author": "Franck Nijhof",
    "author_email": "opensource@frenck.dev",
    "download_url": "https://files.pythonhosted.org/packages/0f/fa/718b5c81aa7ecba08370993a348ba6f6d6a6eb843c9bf90fe74dfa3e353c/toonapi-0.3.0.tar.gz",
    "platform": null,
    "description": "# Python: Asynchronous Python client for the Quby ToonAPI\n\n[![GitHub Release][releases-shield]][releases]\n![Project Stage][project-stage-shield]\n![Project Maintenance][maintenance-shield]\n[![License][license-shield]](LICENSE.md)\n\n[![Build Status][build-shield]][build]\n[![Code Coverage][codecov-shield]][codecov]\n[![Code Quality][code-quality-shield]][code-quality]\n\n[![Sponsor Frenck via GitHub Sponsors][github-sponsors-shield]][github-sponsors]\n\n[![Support Frenck on Patreon][patreon-shield]][patreon]\n\nAsynchronous Python client for the Quby ToonAPI.\n\n## About\n\nAn asynchronous python client for the Qubby ToonAPI to control Quby thermostats.\n\nThese thermostats are also sold as:\n\n- Eneco Toon\n- Engie Electrabel Boxx\n- Viesgo\n\nThey all use the same API endpoint, thus this library can be used.\n\nThis library is created to support the integration in\n[Home Assistant](https://www.home-assistant.io).\n\n## Installation\n\n```bash\npip install toonapi\n```\n\n## Usage\n\n```python\nimport asyncio\n\nfrom toonapi import Toon\n\n\nasync def main():\n    \"\"\"Show example on using the ToonAPI.\"\"\"\n    async with Toon(token=\"put-in-token-here\") as toon:\n        agreements = await toon.agreements()\n        print(agreements)\n\n        await toon.activate_agreement(agreement=agreements[0])\n\n        status = await toon.update()\n        print(status.gas_usage)\n        print(status.thermostat)\n        print(status.power_usage)\n\n\nif __name__ == \"__main__\":\n    loop = asyncio.get_event_loop()\n    loop.run_until_complete(main())\n```\n\n## Changelog & Releases\n\nThis repository keeps a change log using [GitHub's releases][releases]\nfunctionality. The format of the log is based on\n[Keep a Changelog][keepchangelog].\n\nReleases are based on [Semantic Versioning][semver], and use the format\nof ``MAJOR.MINOR.PATCH``. In a nutshell, the version will be incremented\nbased on the following:\n\n- ``MAJOR``: Incompatible or major changes.\n- ``MINOR``: Backwards-compatible new features and enhancements.\n- ``PATCH``: Backwards-compatible bugfixes and package updates.\n\n## Contributing\n\nThis is an active open-source project. We are always open to people who want to\nuse the code or contribute to it.\n\nWe've set up a separate document for our\n[contribution guidelines](CONTRIBUTING.md).\n\nThank you for being involved! :heart_eyes:\n\n## Setting up development environment\n\nIn case you'd like to contribute, a `Makefile` has been included to ensure a\nquick start.\n\n```bash\nmake venv\nsource ./venv/bin/activate\nmake dev\n```\n\nNow you can start developing, run `make` without arguments to get an overview\nof all make goals that are available (including description):\n\n```bash\n$ make\nAsynchronous Python client for the Quby ToonAPI.\n\nUsage:\n  make help                            Shows this message.\n  make dev                             Set up a development environment.\n  make lint                            Run all linters.\n  make lint-black                      Run linting using black & blacken-docs.\n  make lint-flake8                     Run linting using flake8 (pycodestyle/pydocstyle).\n  make lint-pylint                     Run linting using PyLint.\n  make lint-mypy                       Run linting using MyPy.\n  make test                            Run tests quickly with the default Python.\n  make coverage                        Check code coverage quickly with the default Python.\n  make install                         Install the package to the active Python's site-packages.\n  make clean                           Removes build, test, coverage and Python artifacts.\n  make clean-all                       Removes all venv, build, test, coverage and Python artifacts.\n  make clean-build                     Removes build artifacts.\n  make clean-pyc                       Removes Python file artifacts.\n  make clean-test                      Removes test and coverage artifacts.\n  make clean-venv                      Removes Python virtual environment artifacts.\n  make dist                            Builds source and wheel package.\n  make release                         Release build on PyP\n  make venv                            Create Python venv environment.\n```\n\n## Authors & contributors\n\nThe original setup of this repository is by [Franck Nijhof][frenck].\n\nFor a full list of all authors and contributors,\ncheck [the contributor's page][contributors].\n\n## License\n\nMIT License\n\nCopyright (c) 2020 Franck Nijhof\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n[build-shield]: https://github.com/frenck/python-toonapi/workflows/Continuous%20Integration/badge.svg\n[build]: https://github.com/frenck/python-toonapi/actions\n[code-quality-shield]: https://img.shields.io/lgtm/grade/python/g/frenck/python-toonapi.svg?logo=lgtm&logoWidth=18\n[code-quality]: https://lgtm.com/projects/g/frenck/python-toonapi/context:python\n[codecov-shield]: https://codecov.io/gh/frenck/python-toonapi/branch/master/graph/badge.svg\n[codecov]: https://codecov.io/gh/frenck/python-toonapi\n[contributors]: https://github.com/frenck/python-toonapi/graphs/contributors\n[frenck]: https://github.com/frenck\n[github-sponsors-shield]: https://frenck.dev/wp-content/uploads/2019/12/github_sponsor.png\n[github-sponsors]: https://github.com/sponsors/frenck\n[keepchangelog]: http://keepachangelog.com/en/1.0.0/\n[license-shield]: https://img.shields.io/github/license/frenck/python-toonapi.svg\n[maintenance-shield]: https://img.shields.io/maintenance/yes/2020.svg\n[patreon-shield]: https://frenck.dev/wp-content/uploads/2019/12/patreon.png\n[patreon]: https://www.patreon.com/frenck\n[project-stage-shield]: https://img.shields.io/badge/project%20stage-experimental-yellow.svg\n[releases-shield]: https://img.shields.io/github/release/frenck/python-toonapi.svg\n[releases]: https://github.com/frenck/python-toonapi/releases\n[semver]: http://semver.org/spec/v2.0.0.html",
    "bugtrack_url": null,
    "license": "MIT license",
    "summary": "Asynchronous Python client for the Quby ToonAPI.",
    "version": "0.3.0",
    "project_urls": {
        "Homepage": "https://github.com/frenck/python-toonapi"
    },
    "split_keywords": [
        "toon",
        "quby",
        "eneco",
        "boxx",
        "engie",
        "electrabel",
        "viesgo",
        "toonapi",
        "api",
        "async",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "58c083108895ea2b7e41c8bddd9a1e35c20df0b77d4072c131ddb465e55848a4",
                "md5": "d3be5ad5ce3373f752ca0efdf5be216f",
                "sha256": "1f432b242b2ed4e5715d977af0ff5d1e42faed73ff3062321746945c0fa83c60"
            },
            "downloads": -1,
            "filename": "toonapi-0.3.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d3be5ad5ce3373f752ca0efdf5be216f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12017,
            "upload_time": "2023-10-20T08:03:03",
            "upload_time_iso_8601": "2023-10-20T08:03:03.036631Z",
            "url": "https://files.pythonhosted.org/packages/58/c0/83108895ea2b7e41c8bddd9a1e35c20df0b77d4072c131ddb465e55848a4/toonapi-0.3.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0ffa718b5c81aa7ecba08370993a348ba6f6d6a6eb843c9bf90fe74dfa3e353c",
                "md5": "f2c136a4e0aed20231c12dfb16da805e",
                "sha256": "19209206f7f5e2387362021b28b57e0830d30031f20ba0bbfdde692c8e214d8c"
            },
            "downloads": -1,
            "filename": "toonapi-0.3.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f2c136a4e0aed20231c12dfb16da805e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 13917,
            "upload_time": "2023-10-20T08:01:50",
            "upload_time_iso_8601": "2023-10-20T08:01:50.752722Z",
            "url": "https://files.pythonhosted.org/packages/0f/fa/718b5c81aa7ecba08370993a348ba6f6d6a6eb843c9bf90fe74dfa3e353c/toonapi-0.3.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-20 08:01:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "frenck",
    "github_project": "python-toonapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "toonapi"
}
        
Elapsed time: 0.13077s