summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 04:03:56 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 04:03:56 +0000
commitc7ea03657fd6cc7ad3740a55c0545a434d3c9d5d (patch)
treedc2398134d1f46f6deaf1f5cf327b3f6362d080d
parent2d2163d783716cca9696371ac632331ad08c0b7b (diff)
automatic import of python-pyeasee
-rw-r--r--.gitignore1
-rw-r--r--python-pyeasee.spec302
-rw-r--r--sources1
3 files changed, 304 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..9f04184 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyeasee-0.7.52.tar.gz
diff --git a/python-pyeasee.spec b/python-pyeasee.spec
new file mode 100644
index 0000000..d193df0
--- /dev/null
+++ b/python-pyeasee.spec
@@ -0,0 +1,302 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyeasee
+Version: 0.7.52
+Release: 1
+Summary: Easee EV charger API library
+License: MIT
+URL: https://github.com/fondberg/pyeasee
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0f/93/448f73a88c2e386c95afb48dba97a2f42ace9589778531bcc471918ceb9d/pyeasee-0.7.52.tar.gz
+BuildArch: noarch
+
+Requires: python3-aiohttp
+Requires: python3-signalrcore
+
+%description
+![Maintenance](https://img.shields.io/maintenance/yes/2022.svg) ![Easee library](https://github.com/fondberg/easee/workflows/Easee%20library/badge.svg)
+
+[![Buy me a coffee](https://img.shields.io/static/v1.svg?label=Buy%20me%20a%20coffee&message=🥨&color=black&logo=buy%20me%20a%20coffee&logoColor=white&labelColor=6f4e37)](https://www.buymeacoffee.com/fondberg)
+
+# Easee EV Charger library
+
+This library is an async thin wrapper around [Easee's Rest API](https://api.easee.cloud/index.html)
+
+## Installation
+
+You can install the libray from [PyPI](https://pypi.org/project/pyeasee/):
+
+ pip install pyeasee
+
+The library is tested on Python 3.7 and Python 3.8
+
+## Command line tool
+
+Run `python -m pyeasee -h` for help.
+
+## Usage of the library
+
+### Docs
+
+Read the API documentation [here](https://fondberg.github.io/pyeasee/pyeasee/)
+
+### Small example
+
+Save the example to a file and run it like this: python3 example.py <username> <password>
+Username is the phone number that was used to register the Easee account with country code.
+E.g. +46xxxxxxxxx.
+
+```python
+import asyncio
+import sys
+from pyeasee import Easee
+
+async def async_main():
+
+ if len(sys.argv) < 3:
+ print(f"Usage: {sys.argv[0]} <username> <password>")
+ return
+
+ print(f"Logging in using: {sys.argv[1]} {sys.argv[2]}")
+ easee = Easee(sys.argv[1], sys.argv[2])
+
+ sites = await easee.get_sites()
+ for site in sites:
+ print(f"Site {site.name} ({site.id})")
+ equalizers = site.get_equalizers()
+ for equalizer in equalizers:
+ print(f" Equalizer: {equalizer.name} ({equalizer.id})")
+ circuits = site.get_circuits()
+ for circuit in circuits:
+ print(f" Circuit {circuit.id}")
+ chargers = circuit.get_chargers()
+ for charger in chargers:
+ state = await charger.get_state()
+ print(f" Charger: {charger.name} ({charger.id}) status: {state['chargerOpMode']}")
+
+ await easee.close()
+
+asyncio.run(async_main())
+```
+
+See also [\_\_main\_\_.py](https://github.com/fondberg/pyeasee/blob/master/pyeasee/__main__.py) for a more complete usage example.
+
+## Development
+
+This project uses `black` for code formatting and `flake8` for linting. To autoformat and run lint run
+
+```
+make lint
+```
+
+
+
+
+%package -n python3-pyeasee
+Summary: Easee EV charger API library
+Provides: python-pyeasee
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyeasee
+![Maintenance](https://img.shields.io/maintenance/yes/2022.svg) ![Easee library](https://github.com/fondberg/easee/workflows/Easee%20library/badge.svg)
+
+[![Buy me a coffee](https://img.shields.io/static/v1.svg?label=Buy%20me%20a%20coffee&message=🥨&color=black&logo=buy%20me%20a%20coffee&logoColor=white&labelColor=6f4e37)](https://www.buymeacoffee.com/fondberg)
+
+# Easee EV Charger library
+
+This library is an async thin wrapper around [Easee's Rest API](https://api.easee.cloud/index.html)
+
+## Installation
+
+You can install the libray from [PyPI](https://pypi.org/project/pyeasee/):
+
+ pip install pyeasee
+
+The library is tested on Python 3.7 and Python 3.8
+
+## Command line tool
+
+Run `python -m pyeasee -h` for help.
+
+## Usage of the library
+
+### Docs
+
+Read the API documentation [here](https://fondberg.github.io/pyeasee/pyeasee/)
+
+### Small example
+
+Save the example to a file and run it like this: python3 example.py <username> <password>
+Username is the phone number that was used to register the Easee account with country code.
+E.g. +46xxxxxxxxx.
+
+```python
+import asyncio
+import sys
+from pyeasee import Easee
+
+async def async_main():
+
+ if len(sys.argv) < 3:
+ print(f"Usage: {sys.argv[0]} <username> <password>")
+ return
+
+ print(f"Logging in using: {sys.argv[1]} {sys.argv[2]}")
+ easee = Easee(sys.argv[1], sys.argv[2])
+
+ sites = await easee.get_sites()
+ for site in sites:
+ print(f"Site {site.name} ({site.id})")
+ equalizers = site.get_equalizers()
+ for equalizer in equalizers:
+ print(f" Equalizer: {equalizer.name} ({equalizer.id})")
+ circuits = site.get_circuits()
+ for circuit in circuits:
+ print(f" Circuit {circuit.id}")
+ chargers = circuit.get_chargers()
+ for charger in chargers:
+ state = await charger.get_state()
+ print(f" Charger: {charger.name} ({charger.id}) status: {state['chargerOpMode']}")
+
+ await easee.close()
+
+asyncio.run(async_main())
+```
+
+See also [\_\_main\_\_.py](https://github.com/fondberg/pyeasee/blob/master/pyeasee/__main__.py) for a more complete usage example.
+
+## Development
+
+This project uses `black` for code formatting and `flake8` for linting. To autoformat and run lint run
+
+```
+make lint
+```
+
+
+
+
+%package help
+Summary: Development documents and examples for pyeasee
+Provides: python3-pyeasee-doc
+%description help
+![Maintenance](https://img.shields.io/maintenance/yes/2022.svg) ![Easee library](https://github.com/fondberg/easee/workflows/Easee%20library/badge.svg)
+
+[![Buy me a coffee](https://img.shields.io/static/v1.svg?label=Buy%20me%20a%20coffee&message=🥨&color=black&logo=buy%20me%20a%20coffee&logoColor=white&labelColor=6f4e37)](https://www.buymeacoffee.com/fondberg)
+
+# Easee EV Charger library
+
+This library is an async thin wrapper around [Easee's Rest API](https://api.easee.cloud/index.html)
+
+## Installation
+
+You can install the libray from [PyPI](https://pypi.org/project/pyeasee/):
+
+ pip install pyeasee
+
+The library is tested on Python 3.7 and Python 3.8
+
+## Command line tool
+
+Run `python -m pyeasee -h` for help.
+
+## Usage of the library
+
+### Docs
+
+Read the API documentation [here](https://fondberg.github.io/pyeasee/pyeasee/)
+
+### Small example
+
+Save the example to a file and run it like this: python3 example.py <username> <password>
+Username is the phone number that was used to register the Easee account with country code.
+E.g. +46xxxxxxxxx.
+
+```python
+import asyncio
+import sys
+from pyeasee import Easee
+
+async def async_main():
+
+ if len(sys.argv) < 3:
+ print(f"Usage: {sys.argv[0]} <username> <password>")
+ return
+
+ print(f"Logging in using: {sys.argv[1]} {sys.argv[2]}")
+ easee = Easee(sys.argv[1], sys.argv[2])
+
+ sites = await easee.get_sites()
+ for site in sites:
+ print(f"Site {site.name} ({site.id})")
+ equalizers = site.get_equalizers()
+ for equalizer in equalizers:
+ print(f" Equalizer: {equalizer.name} ({equalizer.id})")
+ circuits = site.get_circuits()
+ for circuit in circuits:
+ print(f" Circuit {circuit.id}")
+ chargers = circuit.get_chargers()
+ for charger in chargers:
+ state = await charger.get_state()
+ print(f" Charger: {charger.name} ({charger.id}) status: {state['chargerOpMode']}")
+
+ await easee.close()
+
+asyncio.run(async_main())
+```
+
+See also [\_\_main\_\_.py](https://github.com/fondberg/pyeasee/blob/master/pyeasee/__main__.py) for a more complete usage example.
+
+## Development
+
+This project uses `black` for code formatting and `flake8` for linting. To autoformat and run lint run
+
+```
+make lint
+```
+
+
+
+
+%prep
+%autosetup -n pyeasee-0.7.52
+
+%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-pyeasee -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.52-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..02afb3a
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+0f77711fee80f0659ceeebc01e42e7d9 pyeasee-0.7.52.tar.gz