diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-15 07:02:51 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-15 07:02:51 +0000 |
| commit | b90fb1305ef5b386d0dfdf026bcf2a7a1d0b6ac1 (patch) | |
| tree | ca404f622658320004e99af5af7cc3011c8d55eb | |
| parent | a06d67eb6844e24918b028445b10b6dd0d71733c (diff) | |
automatic import of python-thermoworks-smoke
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-thermoworks-smoke.spec | 241 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 243 insertions, 0 deletions
@@ -0,0 +1 @@ +/thermoworks_smoke-0.1.8.tar.gz diff --git a/python-thermoworks-smoke.spec b/python-thermoworks-smoke.spec new file mode 100644 index 0000000..29e7289 --- /dev/null +++ b/python-thermoworks-smoke.spec @@ -0,0 +1,241 @@ +%global _empty_manifest_terminate_build 0 +Name: python-thermoworks-smoke +Version: 0.1.8 +Release: 1 +Summary: Pull data for your thermoworks smoke thermometer +License: GPLv3 +URL: https://github.com/nhorvath/python-thermoworks-smoke +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7d/60/e2f3b71020eada429acbd7a0de779a916e9eb5ec43f3f319f53cb3c14545/thermoworks_smoke-0.1.8.tar.gz +BuildArch: noarch + +Requires: python3-pyrebase4 + +%description +# python-thermoworks-smoke +Pull data for your thermoworks smoke thermometer (https://www.thermoworks.com/Smoke). +This requires a smoke wifi gateway (https://www.thermoworks.com/Smoke-Gateway) with an internet connection. + +You will need to have previously registered your smoke to your account via the mobile app. +You will provide the email and password you used to this application to connect and pull your data. + +Uses Pyrebase4 (https://github.com/nhorvath/Pyrebase4) for interacting with firebase where thermoworks puts the data. + +# Installation +`pip install thermoworks_smoke` + +# API +#### thermoworks_smoke.initialize_app(email, password, init=False, excluded_serials=[]) +* email: the email registered in the thermoworks app +* password: the password registered in the thermoworks app +* init: (optional) set true to preload data for all devices +* excluded_serials: (optional) a list of device serial numbers to ignore + +### The Data Manager returned by initialize_app +#### serials() - list +* Get all device serials registered to this user. +#### data(serial) - dict +* Get data for the specified serial number. Updates will be performed automatically and cached. +#### devices() - list +* Get the list of all devices registred to this user. +#### device(serial) - dict +* Get the device information for the specified serial. +#### name(serial) - string +* Get the device name for the specified serial. +#### units(serial, probe=PROBE_1) - string +* Get the unit for the specified serial and probe. + * You can use `from thermoworks_smoke import TEMP_FAHRENHEIT, TEMP_CELSIUS` to compare to these. + * You can use `from thermoworks_smoke import PROBE_1, PROBE_2` to get the constants for each probe name. +#### update(serial) - void +* Force update from server (do not call this too frequently). Calling this is unnecessary as calls to data() will +automatically update as needed. + +# Usage Example +```python +import thermoworks_smoke + +# init +smoke = thermoworks_smoke.initialize_app(email, password) + +# get list of registered devices +serials = smoke.serials() + +# print data for each serial +for serial in serials: + values = smoke.data(serial) + print(serial) + print(values) + +``` + + + +%package -n python3-thermoworks-smoke +Summary: Pull data for your thermoworks smoke thermometer +Provides: python-thermoworks-smoke +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-thermoworks-smoke +# python-thermoworks-smoke +Pull data for your thermoworks smoke thermometer (https://www.thermoworks.com/Smoke). +This requires a smoke wifi gateway (https://www.thermoworks.com/Smoke-Gateway) with an internet connection. + +You will need to have previously registered your smoke to your account via the mobile app. +You will provide the email and password you used to this application to connect and pull your data. + +Uses Pyrebase4 (https://github.com/nhorvath/Pyrebase4) for interacting with firebase where thermoworks puts the data. + +# Installation +`pip install thermoworks_smoke` + +# API +#### thermoworks_smoke.initialize_app(email, password, init=False, excluded_serials=[]) +* email: the email registered in the thermoworks app +* password: the password registered in the thermoworks app +* init: (optional) set true to preload data for all devices +* excluded_serials: (optional) a list of device serial numbers to ignore + +### The Data Manager returned by initialize_app +#### serials() - list +* Get all device serials registered to this user. +#### data(serial) - dict +* Get data for the specified serial number. Updates will be performed automatically and cached. +#### devices() - list +* Get the list of all devices registred to this user. +#### device(serial) - dict +* Get the device information for the specified serial. +#### name(serial) - string +* Get the device name for the specified serial. +#### units(serial, probe=PROBE_1) - string +* Get the unit for the specified serial and probe. + * You can use `from thermoworks_smoke import TEMP_FAHRENHEIT, TEMP_CELSIUS` to compare to these. + * You can use `from thermoworks_smoke import PROBE_1, PROBE_2` to get the constants for each probe name. +#### update(serial) - void +* Force update from server (do not call this too frequently). Calling this is unnecessary as calls to data() will +automatically update as needed. + +# Usage Example +```python +import thermoworks_smoke + +# init +smoke = thermoworks_smoke.initialize_app(email, password) + +# get list of registered devices +serials = smoke.serials() + +# print data for each serial +for serial in serials: + values = smoke.data(serial) + print(serial) + print(values) + +``` + + + +%package help +Summary: Development documents and examples for thermoworks-smoke +Provides: python3-thermoworks-smoke-doc +%description help +# python-thermoworks-smoke +Pull data for your thermoworks smoke thermometer (https://www.thermoworks.com/Smoke). +This requires a smoke wifi gateway (https://www.thermoworks.com/Smoke-Gateway) with an internet connection. + +You will need to have previously registered your smoke to your account via the mobile app. +You will provide the email and password you used to this application to connect and pull your data. + +Uses Pyrebase4 (https://github.com/nhorvath/Pyrebase4) for interacting with firebase where thermoworks puts the data. + +# Installation +`pip install thermoworks_smoke` + +# API +#### thermoworks_smoke.initialize_app(email, password, init=False, excluded_serials=[]) +* email: the email registered in the thermoworks app +* password: the password registered in the thermoworks app +* init: (optional) set true to preload data for all devices +* excluded_serials: (optional) a list of device serial numbers to ignore + +### The Data Manager returned by initialize_app +#### serials() - list +* Get all device serials registered to this user. +#### data(serial) - dict +* Get data for the specified serial number. Updates will be performed automatically and cached. +#### devices() - list +* Get the list of all devices registred to this user. +#### device(serial) - dict +* Get the device information for the specified serial. +#### name(serial) - string +* Get the device name for the specified serial. +#### units(serial, probe=PROBE_1) - string +* Get the unit for the specified serial and probe. + * You can use `from thermoworks_smoke import TEMP_FAHRENHEIT, TEMP_CELSIUS` to compare to these. + * You can use `from thermoworks_smoke import PROBE_1, PROBE_2` to get the constants for each probe name. +#### update(serial) - void +* Force update from server (do not call this too frequently). Calling this is unnecessary as calls to data() will +automatically update as needed. + +# Usage Example +```python +import thermoworks_smoke + +# init +smoke = thermoworks_smoke.initialize_app(email, password) + +# get list of registered devices +serials = smoke.serials() + +# print data for each serial +for serial in serials: + values = smoke.data(serial) + print(serial) + print(values) + +``` + + + +%prep +%autosetup -n thermoworks-smoke-0.1.8 + +%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-thermoworks-smoke -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 0.1.8-1 +- Package Spec generated @@ -0,0 +1 @@ +10c687a119e5d77540a48aa5c7a27034 thermoworks_smoke-0.1.8.tar.gz |
