summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-05 08:06:10 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-05 08:06:10 +0000
commit15de2109bcc0aceb974ceb3b64117b1a19fb859b (patch)
treedb863634d81e903a12d28d42cc664eaaccbc1b70
parent4d1810e565d0da8e5ca1e12e7490b9faa7a58178 (diff)
automatic import of python-pyflickopeneuler20.03
-rw-r--r--.gitignore1
-rw-r--r--python-pyflick.spec282
-rw-r--r--sources1
3 files changed, 284 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d945a32 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/PyFlick-0.0.2.tar.gz
diff --git a/python-pyflick.spec b/python-pyflick.spec
new file mode 100644
index 0000000..2b76558
--- /dev/null
+++ b/python-pyflick.spec
@@ -0,0 +1,282 @@
+%global _empty_manifest_terminate_build 0
+Name: python-PyFlick
+Version: 0.0.2
+Release: 1
+Summary: Python API For Flick Electric in New Zealand
+License: MIT License
+URL: https://github.com/ZephireNZ/PyFlick
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/bf/b3/2714f824b14c9617db6c27ddd4d6ac5b472be2be5bbc3eeaa9d04dbddf44/PyFlick-0.0.2.tar.gz
+BuildArch: noarch
+
+
+%description
+[![Build Status](https://travis-ci.org/ZephireNZ/PyFlick.png?branch=master)](https://travis-ci.org/ZephireNZ/PyFlick)
+[![PyPI version](https://badge.fury.io/py/PyFlick.svg)](https://pypi.org/project/PyFlick/)
+
+# PyFlick
+A quick and dirty Python API for [Flick Electric](https://flickelectric.co.nz).
+
+### Usage
+
+```python
+from pyflick import FlickAPI
+from pyflick.authentication import SimpleFlickAuth
+from aiohttp import ClientSession
+
+def async get_flick_pricing():
+ async with ClientSession() as session:
+ auth = SimpleFlickAuth("USERNAME", "PASSWORD", session)
+
+ api = FlickAPI(auth)
+
+ return await api.getPricing()
+```
+
+The `SimpleFlickAuth` client can also accept custom client ID and secret (this can be found by sniffing the client).
+
+API will return a `FlickPrice` object for accessing the price information.
+
+You can also get the raw data via `FlickPrice.raw`.
+
+This will return a price object that looks a little like this:
+
+```json
+{
+ "kind": "mobile_provider_price",
+ "customer_state": "active",
+ "needle": {
+ "price": "11.163",
+ "status": "urn:flick:market:price:no_contract",
+ "unit_code": "cents",
+ "per": "kwh",
+ "start_at": "2020-04-19T02:30:00Z",
+ "end_at": "2020-04-19T02:59:59Z",
+ "now": "2020-04-19T02:34:38.410Z",
+ "type": "rated",
+ "charge_methods": [
+ "kwh"
+ ],
+ "components": [
+ {
+ "kind": "component",
+ "charge_method": "kwh",
+ "charge_setter": "retailer",
+ "value": "4.26",
+ "quantity": "1.0",
+ "unit_code": "cents",
+ "per": "kwh",
+ "flow_direction": "import",
+ "metadata": {
+ "content_code": "UN",
+ "channel_number": 1,
+ "meter_serial_number": "RD1111111",
+ "hours_of_availability": 24
+ },
+ "_links": {}
+ },
+ ...
+ ]
+ }
+}
+```
+
+
+
+%package -n python3-PyFlick
+Summary: Python API For Flick Electric in New Zealand
+Provides: python-PyFlick
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-PyFlick
+[![Build Status](https://travis-ci.org/ZephireNZ/PyFlick.png?branch=master)](https://travis-ci.org/ZephireNZ/PyFlick)
+[![PyPI version](https://badge.fury.io/py/PyFlick.svg)](https://pypi.org/project/PyFlick/)
+
+# PyFlick
+A quick and dirty Python API for [Flick Electric](https://flickelectric.co.nz).
+
+### Usage
+
+```python
+from pyflick import FlickAPI
+from pyflick.authentication import SimpleFlickAuth
+from aiohttp import ClientSession
+
+def async get_flick_pricing():
+ async with ClientSession() as session:
+ auth = SimpleFlickAuth("USERNAME", "PASSWORD", session)
+
+ api = FlickAPI(auth)
+
+ return await api.getPricing()
+```
+
+The `SimpleFlickAuth` client can also accept custom client ID and secret (this can be found by sniffing the client).
+
+API will return a `FlickPrice` object for accessing the price information.
+
+You can also get the raw data via `FlickPrice.raw`.
+
+This will return a price object that looks a little like this:
+
+```json
+{
+ "kind": "mobile_provider_price",
+ "customer_state": "active",
+ "needle": {
+ "price": "11.163",
+ "status": "urn:flick:market:price:no_contract",
+ "unit_code": "cents",
+ "per": "kwh",
+ "start_at": "2020-04-19T02:30:00Z",
+ "end_at": "2020-04-19T02:59:59Z",
+ "now": "2020-04-19T02:34:38.410Z",
+ "type": "rated",
+ "charge_methods": [
+ "kwh"
+ ],
+ "components": [
+ {
+ "kind": "component",
+ "charge_method": "kwh",
+ "charge_setter": "retailer",
+ "value": "4.26",
+ "quantity": "1.0",
+ "unit_code": "cents",
+ "per": "kwh",
+ "flow_direction": "import",
+ "metadata": {
+ "content_code": "UN",
+ "channel_number": 1,
+ "meter_serial_number": "RD1111111",
+ "hours_of_availability": 24
+ },
+ "_links": {}
+ },
+ ...
+ ]
+ }
+}
+```
+
+
+
+%package help
+Summary: Development documents and examples for PyFlick
+Provides: python3-PyFlick-doc
+%description help
+[![Build Status](https://travis-ci.org/ZephireNZ/PyFlick.png?branch=master)](https://travis-ci.org/ZephireNZ/PyFlick)
+[![PyPI version](https://badge.fury.io/py/PyFlick.svg)](https://pypi.org/project/PyFlick/)
+
+# PyFlick
+A quick and dirty Python API for [Flick Electric](https://flickelectric.co.nz).
+
+### Usage
+
+```python
+from pyflick import FlickAPI
+from pyflick.authentication import SimpleFlickAuth
+from aiohttp import ClientSession
+
+def async get_flick_pricing():
+ async with ClientSession() as session:
+ auth = SimpleFlickAuth("USERNAME", "PASSWORD", session)
+
+ api = FlickAPI(auth)
+
+ return await api.getPricing()
+```
+
+The `SimpleFlickAuth` client can also accept custom client ID and secret (this can be found by sniffing the client).
+
+API will return a `FlickPrice` object for accessing the price information.
+
+You can also get the raw data via `FlickPrice.raw`.
+
+This will return a price object that looks a little like this:
+
+```json
+{
+ "kind": "mobile_provider_price",
+ "customer_state": "active",
+ "needle": {
+ "price": "11.163",
+ "status": "urn:flick:market:price:no_contract",
+ "unit_code": "cents",
+ "per": "kwh",
+ "start_at": "2020-04-19T02:30:00Z",
+ "end_at": "2020-04-19T02:59:59Z",
+ "now": "2020-04-19T02:34:38.410Z",
+ "type": "rated",
+ "charge_methods": [
+ "kwh"
+ ],
+ "components": [
+ {
+ "kind": "component",
+ "charge_method": "kwh",
+ "charge_setter": "retailer",
+ "value": "4.26",
+ "quantity": "1.0",
+ "unit_code": "cents",
+ "per": "kwh",
+ "flow_direction": "import",
+ "metadata": {
+ "content_code": "UN",
+ "channel_number": 1,
+ "meter_serial_number": "RD1111111",
+ "hours_of_availability": 24
+ },
+ "_links": {}
+ },
+ ...
+ ]
+ }
+}
+```
+
+
+
+%prep
+%autosetup -n PyFlick-0.0.2
+
+%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-PyFlick -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 0.0.2-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..1a4bc35
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+305a5514df312d564671c37be22896b0 PyFlick-0.0.2.tar.gz