summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 08:59:29 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 08:59:29 +0000
commitd34b20d612db217ee3eae8e5a49ca5427d6fc2b5 (patch)
tree5959abf7c707e2491e2dc2ecf8897a52d9f8dd23
parentf4d0b479a97ba9de157265327eef8a165c0f8f7e (diff)
automatic import of python-toonapi
-rw-r--r--.gitignore1
-rw-r--r--python-toonapi.spec618
-rw-r--r--sources1
3 files changed, 620 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..369f210 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/toonapi-0.2.1.tar.gz
diff --git a/python-toonapi.spec b/python-toonapi.spec
new file mode 100644
index 0000000..cca5944
--- /dev/null
+++ b/python-toonapi.spec
@@ -0,0 +1,618 @@
+%global _empty_manifest_terminate_build 0
+Name: python-toonapi
+Version: 0.2.1
+Release: 1
+Summary: Asynchronous Python client for the Quby ToonAPI.
+License: MIT license
+URL: https://github.com/frenck/python-toonapi
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/4a/bd/e429f9a94a9063f7e5b107c87a29fac0aa09ee7f3b8792175a6cd693f753/toonapi-0.2.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-aiohttp
+Requires: python3-backoff
+Requires: python3-yarl
+
+%description
+# 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
+
+
+
+
+%package -n python3-toonapi
+Summary: Asynchronous Python client for the Quby ToonAPI.
+Provides: python-toonapi
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-toonapi
+# 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
+
+
+
+
+%package help
+Summary: Development documents and examples for toonapi
+Provides: python3-toonapi-doc
+%description help
+# 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
+
+
+
+
+%prep
+%autosetup -n toonapi-0.2.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-toonapi -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c2830f5
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+18d2d160f505380ce47c2683a6fda29d toonapi-0.2.1.tar.gz