From fed09bdaff0ed0955a8b9745d5357f33c553db3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andrius=20=C5=A0tikonas?= Date: Sun, 27 Dec 2020 20:18:22 +0000 Subject: [PATCH] Add dependency on async_property. --- .gitignore | 1 + neohubapi/neohub.py | 2 ++ setup.py | 20 +++++++++++--------- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/.gitignore b/.gitignore index 2ac981d..be5a3fa 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ __pycache__ *~ +*#*# .kdev4 *.kdev4 build/ diff --git a/neohubapi/neohub.py b/neohubapi/neohub.py index 5cc0dc4..b9b0c77 100644 --- a/neohubapi/neohub.py +++ b/neohubapi/neohub.py @@ -5,6 +5,7 @@ import asyncio import datetime import json import logging +from async_property import async_property, async_cached_property from types import SimpleNamespace from neohubapi.enums import ScheduleFormat @@ -75,6 +76,7 @@ class NeoHub: data.ALT_TIMER_FORMAT = schedule_format_int_to_enum(data.ALT_TIMER_FORMAT) return data + @async_cached_property async def target_temperature_step(self): """ Returns Neohub's target temperature step diff --git a/setup.py b/setup.py index a6571c9..c8aaca4 100755 --- a/setup.py +++ b/setup.py @@ -10,21 +10,23 @@ with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( - name = "neohubapi", - version = "0.1", - description = "Async library to communicate with Heatmiser NeoHub 2 API.", - url = "https://gitlab.com/neohubapi/neohubapi/", - author = "Andrius Štikonas", - author_email = "andrius@stikonas.eu", + name="neohubapi", + version="0.1", + description="Async library to communicate with Heatmiser NeoHub 2 API.", + url="https://gitlab.com/neohubapi/neohubapi/", + author="Andrius Štikonas", + author_email="andrius@stikonas.eu", classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", ], + install_requires=[ + 'async_property', + ], long_description=long_description, long_description_content_type='text/markdown', packages=setuptools.find_packages(), - install_requires = ['neohubapi'], - keywords = ['neohub', 'heatmiser'], - zip_safe = True, + keywords=['neohub', 'heatmiser'], + zip_safe=True, )