From f673710c3ed9572cb55ddf012dd94c3a367eec72 Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Thu, 27 Feb 2020 15:12:33 +0100 Subject: [PATCH] homecontrol: use poetry for project management --- Pipfile | 11 - homecontrol.egg-info/PKG-INFO | 11 + homecontrol.egg-info/SOURCES.txt | 8 + homecontrol.egg-info/dependency_links.txt | 1 + homecontrol.egg-info/entry_points.txt | 3 + homecontrol.egg-info/requires.txt | 3 + homecontrol.egg-info/top_level.txt | 1 + homecontrol/__main__.py | 3 + homecontrol.py => homecontrol/homecontrol.py | 45 +- poetry.lock | 481 +++++++++++++++++++ pyproject.toml | 23 + 11 files changed, 560 insertions(+), 30 deletions(-) delete mode 100644 Pipfile create mode 100644 homecontrol.egg-info/PKG-INFO create mode 100644 homecontrol.egg-info/SOURCES.txt create mode 100644 homecontrol.egg-info/dependency_links.txt create mode 100644 homecontrol.egg-info/entry_points.txt create mode 100644 homecontrol.egg-info/requires.txt create mode 100644 homecontrol.egg-info/top_level.txt create mode 100644 homecontrol/__main__.py rename homecontrol.py => homecontrol/homecontrol.py (86%) create mode 100644 poetry.lock create mode 100644 pyproject.toml diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 8d67bb7..0000000 --- a/Pipfile +++ /dev/null @@ -1,11 +0,0 @@ -[[source]] -url = "https://pypi.python.org/simple" -verify_ssl = true -name = "pypi" - -[dev-packages] - -[packages] -requests = {version="*"} -flask = {version="*"} -dataset = {version="*"} diff --git a/homecontrol.egg-info/PKG-INFO b/homecontrol.egg-info/PKG-INFO new file mode 100644 index 0000000..fd55f91 --- /dev/null +++ b/homecontrol.egg-info/PKG-INFO @@ -0,0 +1,11 @@ +Metadata-Version: 1.2 +Name: homecontrol +Version: 0.1.0 +Summary: central application to connect iot devices +Home-page: UNKNOWN +Author: Konstantin Koslowski +Author-email: konstantin.koslowski@gmail.com +License: UNKNOWN +Description: UNKNOWN +Platform: UNKNOWN +Requires-Python: >=3.8,<4.0 diff --git a/homecontrol.egg-info/SOURCES.txt b/homecontrol.egg-info/SOURCES.txt new file mode 100644 index 0000000..9635c5b --- /dev/null +++ b/homecontrol.egg-info/SOURCES.txt @@ -0,0 +1,8 @@ +setup.py +homecontrol/homecontrol.py +homecontrol.egg-info/PKG-INFO +homecontrol.egg-info/SOURCES.txt +homecontrol.egg-info/dependency_links.txt +homecontrol.egg-info/entry_points.txt +homecontrol.egg-info/requires.txt +homecontrol.egg-info/top_level.txt \ No newline at end of file diff --git a/homecontrol.egg-info/dependency_links.txt b/homecontrol.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/homecontrol.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/homecontrol.egg-info/entry_points.txt b/homecontrol.egg-info/entry_points.txt new file mode 100644 index 0000000..bbdbc60 --- /dev/null +++ b/homecontrol.egg-info/entry_points.txt @@ -0,0 +1,3 @@ +[console_scripts] +homecontrol = homecontrol.homecontrol:main + diff --git a/homecontrol.egg-info/requires.txt b/homecontrol.egg-info/requires.txt new file mode 100644 index 0000000..96ec3f6 --- /dev/null +++ b/homecontrol.egg-info/requires.txt @@ -0,0 +1,3 @@ +dataset<2.0.0,>=1.2.2 +flask<2.0.0,>=1.1.1 +requests<3.0.0,>=2.23.0 diff --git a/homecontrol.egg-info/top_level.txt b/homecontrol.egg-info/top_level.txt new file mode 100644 index 0000000..3022831 --- /dev/null +++ b/homecontrol.egg-info/top_level.txt @@ -0,0 +1 @@ +homecontrol diff --git a/homecontrol/__main__.py b/homecontrol/__main__.py new file mode 100644 index 0000000..07ecc38 --- /dev/null +++ b/homecontrol/__main__.py @@ -0,0 +1,3 @@ +import homecontrol + +homecontrol.main() diff --git a/homecontrol.py b/homecontrol/homecontrol.py similarity index 86% rename from homecontrol.py rename to homecontrol/homecontrol.py index 8e4a768..84d44b3 100755 --- a/homecontrol.py +++ b/homecontrol/homecontrol.py @@ -4,11 +4,13 @@ import logging import argparse import time import dataset +import os import sys from math import inf +from xdg import XDG_CONFIG_HOME -CONFIG_FILE = 'config.json' -DB_FILE = 'db.sqlite' +CONFIG_FILE = f"{XDG_CONFIG_HOME}/homecontrol.json" +DB_FILE = f"{XDG_CONFIG_HOME}/homecontrol.sqlite" LIMIT=100 PORT = 5000 # TIMEOUT_CLIENT = 10 @@ -35,9 +37,11 @@ def setup(): args = parser.parse_args() # initialize config + if not os.path.exists(XDG_CONFIG_HOME): + os.makedirs(XDG_CONFIG_HOME) config = {} try: - config_file = open(args.config, 'r') + config_file = open(args.config, "r") config = json.load(config_file) except: pass @@ -63,8 +67,8 @@ def setup(): class Logger: def __init__(self, name, debug): - FORMAT='%(asctime)-8s %(name)12s::%(levelname)-7s %(message)s' - DATEFMT='%H:%M:%S' + FORMAT="[%(asctime)13s :: %(name)18s :: %(levelname)7s] %(message)s" + DATEFMT="%Y%m%d %H:%M:%S" logging.basicConfig(level=logging.INFO, format=FORMAT, datefmt=DATEFMT) self.logger = logging.getLogger(name) if debug: @@ -79,7 +83,7 @@ class Core: self.logger = Logger("Core", debug).getLogger() self.logger.info("initialization starting...") self.actor_queue = {} - self.db = dataset.connect("sqlite:///%s?check_same_thread=False" % dbfile) + self.db = dataset.connect(f"sqlite:///{dbfile}?check_same_thread=False") self.logger.info("initialization complete.") @@ -92,7 +96,7 @@ class Core: self.db['actor_levels'].insert({"actorId": actorId, "ts": time.time(), "level": level}) except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -101,7 +105,7 @@ class Core: if self.db["actors"].find_one(actorId=actorId): self.actor_queue[actorId] = {"command": command, "data": data} except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") def actor_get_actors(self): @@ -111,7 +115,7 @@ class Core: actorId = s["actorId"] ret[actorId] = self.actor_get_info(actorId) except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -126,7 +130,7 @@ class Core: ret["ts"] = q["ts"] ret["level"] = "0x%x" % q["level"] except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -144,7 +148,7 @@ class Core: levels.append({"ts": q["ts"], "value": "0x%x" % q["level"]}) ret["levels"] = levels except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -155,7 +159,7 @@ class Core: if actorId in self.actor_queue: ret = self.actor_queue.pop(actorId) except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret def sensor_get_info(self, sensorId): @@ -167,7 +171,7 @@ class Core: q = self.db["sensor_values"].find_one(sensorId=sensorId, order_by="-ts") ret["ts"] = q["ts"] except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -187,7 +191,7 @@ class Core: values.append({"ts": float(q["ts"]), "value": float(q["value"])}) ret["values"] = values except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -199,7 +203,7 @@ class Core: sensorId = s["sensorId"] ret[sensorId] = self.sensor_get_info(sensorId) except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -211,7 +215,7 @@ class Core: self.db['sensor_values'].insert({"sensorId": sensorId, "ts": time.time(), "value": value}) except Exception as ex: - self.logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + self.logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") return ret @@ -229,7 +233,7 @@ def actor_command(): data = content.get("data") core.actor_add_queue(actorId, command, data) except Exception as ex: - logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") abort(400) return make_response(jsonify(ret), 200) @@ -265,7 +269,7 @@ def actor_update(): core.actor_add_level(actorId, actorType, maxLevel, level) ret = core.actor_get_queue(actorId) except Exception as ex: - logger.error('Exception Type:%s, args:\n%s' % (type(ex).__name__, ex.args)) + logger.error("Exception Type:{type(ex).__name__}, args: {ex.args}") abort(400) return make_response(jsonify(ret), 200) @@ -309,9 +313,12 @@ def sensor_add_value(): return make_response(jsonify(ret), 200) -if __name__ == "__main__": +def main(): args, config = setup() core = Core(config['dbfile'], args.debug) logger = Logger("main", args.debug).getLogger() app.run(host='0.0.0.0', port=config['port'], debug=args.debugflask) + +if __name__ == "__main__": + main() diff --git a/poetry.lock b/poetry.lock new file mode 100644 index 0000000..55412dc --- /dev/null +++ b/poetry.lock @@ -0,0 +1,481 @@ +[[package]] +category = "main" +description = "A database migration tool for SQLAlchemy." +name = "alembic" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.4.0" + +[package.dependencies] +Mako = "*" +SQLAlchemy = ">=1.1.0" +python-dateutil = "*" +python-editor = ">=0.3" + +[[package]] +category = "dev" +description = "Atomic file writes." +marker = "sys_platform == \"win32\"" +name = "atomicwrites" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.3.0" + +[[package]] +category = "dev" +description = "Classes Without Boilerplate" +name = "attrs" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "19.3.0" + +[package.extras] +azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"] +dev = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "pre-commit"] +docs = ["sphinx", "zope.interface"] +tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] + +[[package]] +category = "main" +description = "Python package for providing Mozilla's CA Bundle." +name = "certifi" +optional = false +python-versions = "*" +version = "2019.11.28" + +[[package]] +category = "main" +description = "Universal encoding detector for Python 2 and 3" +name = "chardet" +optional = false +python-versions = "*" +version = "3.0.4" + +[[package]] +category = "main" +description = "Composable command line interface toolkit" +name = "click" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "7.0" + +[[package]] +category = "dev" +description = "Cross-platform colored terminal text." +marker = "sys_platform == \"win32\"" +name = "colorama" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "0.4.3" + +[[package]] +category = "main" +description = "Toolkit for Python-based database access." +name = "dataset" +optional = false +python-versions = "*" +version = "1.2.2" + +[package.dependencies] +alembic = ">=0.6.2" +sqlalchemy = ">=1.2.2" + +[[package]] +category = "main" +description = "A simple framework for building complex web applications." +name = "flask" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "1.1.1" + +[package.dependencies] +Jinja2 = ">=2.10.1" +Werkzeug = ">=0.15" +click = ">=5.1" +itsdangerous = ">=0.24" + +[package.extras] +dev = ["pytest", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinxcontrib-log-cabinet", "sphinx-issues"] +docs = ["sphinx", "pallets-sphinx-themes", "sphinxcontrib-log-cabinet", "sphinx-issues"] +dotenv = ["python-dotenv"] + +[[package]] +category = "main" +description = "Internationalized Domain Names in Applications (IDNA)" +name = "idna" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "2.9" + +[[package]] +category = "main" +description = "Various helpers to pass data to untrusted environments and back." +name = "itsdangerous" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.1.0" + +[[package]] +category = "main" +description = "A very fast and expressive template engine." +name = "jinja2" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.11.1" + +[package.dependencies] +MarkupSafe = ">=0.23" + +[package.extras] +i18n = ["Babel (>=0.8)"] + +[[package]] +category = "main" +description = "A super-fast templating language that borrows the best ideas from the existing templating languages." +name = "mako" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.1.1" + +[package.dependencies] +MarkupSafe = ">=0.9.2" + +[package.extras] +babel = ["babel"] +lingua = ["lingua"] + +[[package]] +category = "main" +description = "Safely add untrusted strings to HTML/XML markup." +name = "markupsafe" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +version = "1.1.1" + +[[package]] +category = "dev" +description = "More routines for operating on iterables, beyond itertools" +name = "more-itertools" +optional = false +python-versions = ">=3.5" +version = "8.2.0" + +[[package]] +category = "dev" +description = "Core utilities for Python packages" +name = "packaging" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "20.1" + +[package.dependencies] +pyparsing = ">=2.0.2" +six = "*" + +[[package]] +category = "dev" +description = "plugin and hook calling mechanisms for python" +name = "pluggy" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "0.13.1" + +[package.extras] +dev = ["pre-commit", "tox"] + +[[package]] +category = "dev" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +name = "py" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.8.1" + +[[package]] +category = "dev" +description = "Python parsing module" +name = "pyparsing" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "2.4.6" + +[[package]] +category = "dev" +description = "pytest: simple powerful testing with Python" +name = "pytest" +optional = false +python-versions = ">=3.5" +version = "5.3.5" + +[package.dependencies] +atomicwrites = ">=1.0" +attrs = ">=17.4.0" +colorama = "*" +more-itertools = ">=4.0.0" +packaging = "*" +pluggy = ">=0.12,<1.0" +py = ">=1.5.0" +wcwidth = "*" + +[package.extras] +checkqa-mypy = ["mypy (v0.761)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] + +[[package]] +category = "main" +description = "Extensions to the standard Python datetime module" +name = "python-dateutil" +optional = false +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" +version = "2.8.1" + +[package.dependencies] +six = ">=1.5" + +[[package]] +category = "main" +description = "Programmatically open an editor, capture the result." +name = "python-editor" +optional = false +python-versions = "*" +version = "1.0.4" + +[[package]] +category = "main" +description = "Python HTTP for Humans." +name = "requests" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "2.23.0" + +[package.dependencies] +certifi = ">=2017.4.17" +chardet = ">=3.0.2,<4" +idna = ">=2.5,<3" +urllib3 = ">=1.21.1,<1.25.0 || >1.25.0,<1.25.1 || >1.25.1,<1.26" + +[package.extras] +security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7)", "win-inet-pton"] + +[[package]] +category = "main" +description = "Python 2 and 3 compatibility utilities" +name = "six" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +version = "1.14.0" + +[[package]] +category = "main" +description = "Database Abstraction Library" +name = "sqlalchemy" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +version = "1.3.13" + +[package.extras] +mssql = ["pyodbc"] +mssql_pymssql = ["pymssql"] +mssql_pyodbc = ["pyodbc"] +mysql = ["mysqlclient"] +oracle = ["cx-oracle"] +postgresql = ["psycopg2"] +postgresql_pg8000 = ["pg8000"] +postgresql_psycopg2binary = ["psycopg2-binary"] +postgresql_psycopg2cffi = ["psycopg2cffi"] +pymysql = ["pymysql"] + +[[package]] +category = "main" +description = "HTTP library with thread-safe connection pooling, file post, and more." +name = "urllib3" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +version = "1.25.8" + +[package.extras] +brotli = ["brotlipy (>=0.6.0)"] +secure = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)", "idna (>=2.0.0)", "certifi", "ipaddress"] +socks = ["PySocks (>=1.5.6,<1.5.7 || >1.5.7,<2.0)"] + +[[package]] +category = "dev" +description = "Measures number of Terminal column cells of wide-character codes" +name = "wcwidth" +optional = false +python-versions = "*" +version = "0.1.8" + +[[package]] +category = "main" +description = "The comprehensive WSGI web application library." +name = "werkzeug" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +version = "1.0.0" + +[package.extras] +dev = ["pytest", "coverage", "tox", "sphinx", "pallets-sphinx-themes", "sphinx-issues"] +watchdog = ["watchdog"] + +[[package]] +category = "main" +description = "Variables defined by the XDG Base Directory Specification" +name = "xdg" +optional = false +python-versions = ">=3.6,<4.0" +version = "4.0.1" + +[metadata] +content-hash = "16ab7be1164526511af6ed79ca5a18d81640a45f6b724a8c630738700b25eaef" +python-versions = "^3.8" + +[metadata.files] +alembic = [ + {file = "alembic-1.4.0.tar.gz", hash = "sha256:2df2519a5b002f881517693b95626905a39c5faf4b5a1f94de4f1441095d1d26"}, +] +atomicwrites = [ + {file = "atomicwrites-1.3.0-py2.py3-none-any.whl", hash = "sha256:03472c30eb2c5d1ba9227e4c2ca66ab8287fbfbbda3888aa93dc2e28fc6811b4"}, + {file = "atomicwrites-1.3.0.tar.gz", hash = "sha256:75a9445bac02d8d058d5e1fe689654ba5a6556a1dfd8ce6ec55a0ed79866cfa6"}, +] +attrs = [ + {file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"}, + {file = "attrs-19.3.0.tar.gz", hash = "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"}, +] +certifi = [ + {file = "certifi-2019.11.28-py2.py3-none-any.whl", hash = "sha256:017c25db2a153ce562900032d5bc68e9f191e44e9a0f762f373977de9df1fbb3"}, + {file = "certifi-2019.11.28.tar.gz", hash = "sha256:25b64c7da4cd7479594d035c08c2d809eb4aab3a26e5a990ea98cc450c320f1f"}, +] +chardet = [ + {file = "chardet-3.0.4-py2.py3-none-any.whl", hash = "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691"}, + {file = "chardet-3.0.4.tar.gz", hash = "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae"}, +] +click = [ + {file = "Click-7.0-py2.py3-none-any.whl", hash = "sha256:2335065e6395b9e67ca716de5f7526736bfa6ceead690adf616d925bdc622b13"}, + {file = "Click-7.0.tar.gz", hash = "sha256:5b94b49521f6456670fdb30cd82a4eca9412788a93fa6dd6df72c94d5a8ff2d7"}, +] +colorama = [ + {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, + {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, +] +dataset = [ + {file = "dataset-1.2.2-py2.py3-none-any.whl", hash = "sha256:8cbfeda10c06db34603afc062fa7837a23cec85dd342b05fce6304d006a81bee"}, + {file = "dataset-1.2.2.tar.gz", hash = "sha256:b9203ac8fe2a80a4c91ab7b9725c1d7cefce63608c37b913f8fe9bff4565f42b"}, +] +flask = [ + {file = "Flask-1.1.1-py2.py3-none-any.whl", hash = "sha256:45eb5a6fd193d6cf7e0cf5d8a5b31f83d5faae0293695626f539a823e93b13f6"}, + {file = "Flask-1.1.1.tar.gz", hash = "sha256:13f9f196f330c7c2c5d7a5cf91af894110ca0215ac051b5844701f2bfd934d52"}, +] +idna = [ + {file = "idna-2.9-py2.py3-none-any.whl", hash = "sha256:a068a21ceac8a4d63dbfd964670474107f541babbd2250d61922f029858365fa"}, + {file = "idna-2.9.tar.gz", hash = "sha256:7588d1c14ae4c77d74036e8c22ff447b26d0fde8f007354fd48a7814db15b7cb"}, +] +itsdangerous = [ + {file = "itsdangerous-1.1.0-py2.py3-none-any.whl", hash = "sha256:b12271b2047cb23eeb98c8b5622e2e5c5e9abd9784a153e9d8ef9cb4dd09d749"}, + {file = "itsdangerous-1.1.0.tar.gz", hash = "sha256:321b033d07f2a4136d3ec762eac9f16a10ccd60f53c0c91af90217ace7ba1f19"}, +] +jinja2 = [ + {file = "Jinja2-2.11.1-py2.py3-none-any.whl", hash = "sha256:b0eaf100007721b5c16c1fc1eecb87409464edc10469ddc9a22a27a99123be49"}, + {file = "Jinja2-2.11.1.tar.gz", hash = "sha256:93187ffbc7808079673ef52771baa950426fd664d3aad1d0fa3e95644360e250"}, +] +mako = [ + {file = "Mako-1.1.1.tar.gz", hash = "sha256:2984a6733e1d472796ceef37ad48c26f4a984bb18119bb2dbc37a44d8f6e75a4"}, +] +markupsafe = [ + {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, + {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, + {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, + {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, + {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, +] +more-itertools = [ + {file = "more-itertools-8.2.0.tar.gz", hash = "sha256:b1ddb932186d8a6ac451e1d95844b382f55e12686d51ca0c68b6f61f2ab7a507"}, + {file = "more_itertools-8.2.0-py3-none-any.whl", hash = "sha256:5dd8bcf33e5f9513ffa06d5ad33d78f31e1931ac9a18f33d37e77a180d393a7c"}, +] +packaging = [ + {file = "packaging-20.1-py2.py3-none-any.whl", hash = "sha256:170748228214b70b672c581a3dd610ee51f733018650740e98c7df862a583f73"}, + {file = "packaging-20.1.tar.gz", hash = "sha256:e665345f9eef0c621aa0bf2f8d78cf6d21904eef16a93f020240b704a57f1334"}, +] +pluggy = [ + {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, + {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, +] +py = [ + {file = "py-1.8.1-py2.py3-none-any.whl", hash = "sha256:c20fdd83a5dbc0af9efd622bee9a5564e278f6380fffcacc43ba6f43db2813b0"}, + {file = "py-1.8.1.tar.gz", hash = "sha256:5e27081401262157467ad6e7f851b7aa402c5852dbcb3dae06768434de5752aa"}, +] +pyparsing = [ + {file = "pyparsing-2.4.6-py2.py3-none-any.whl", hash = "sha256:c342dccb5250c08d45fd6f8b4a559613ca603b57498511740e65cd11a2e7dcec"}, + {file = "pyparsing-2.4.6.tar.gz", hash = "sha256:4c830582a84fb022400b85429791bc551f1f4871c33f23e44f353119e92f969f"}, +] +pytest = [ + {file = "pytest-5.3.5-py3-none-any.whl", hash = "sha256:ff615c761e25eb25df19edddc0b970302d2a9091fbce0e7213298d85fb61fef6"}, + {file = "pytest-5.3.5.tar.gz", hash = "sha256:0d5fe9189a148acc3c3eb2ac8e1ac0742cb7618c084f3d228baaec0c254b318d"}, +] +python-dateutil = [ + {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, + {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, +] +python-editor = [ + {file = "python-editor-1.0.4.tar.gz", hash = "sha256:51fda6bcc5ddbbb7063b2af7509e43bd84bfc32a4ff71349ec7847713882327b"}, + {file = "python_editor-1.0.4-py2-none-any.whl", hash = "sha256:5f98b069316ea1c2ed3f67e7f5df6c0d8f10b689964a4a811ff64f0106819ec8"}, + {file = "python_editor-1.0.4-py2.7.egg", hash = "sha256:ea87e17f6ec459e780e4221f295411462e0d0810858e055fc514684350a2f522"}, + {file = "python_editor-1.0.4-py3-none-any.whl", hash = "sha256:1bf6e860a8ad52a14c3ee1252d5dc25b2030618ed80c022598f00176adc8367d"}, + {file = "python_editor-1.0.4-py3.5.egg", hash = "sha256:c3da2053dbab6b29c94e43c486ff67206eafbe7eb52dbec7390b5e2fb05aac77"}, +] +requests = [ + {file = "requests-2.23.0-py2.py3-none-any.whl", hash = "sha256:43999036bfa82904b6af1d99e4882b560e5e2c68e5c4b0aa03b655f3d7d73fee"}, + {file = "requests-2.23.0.tar.gz", hash = "sha256:b3f43d496c6daba4493e7c431722aeb7dbc6288f52a6e04e7b6023b0247817e6"}, +] +six = [ + {file = "six-1.14.0-py2.py3-none-any.whl", hash = "sha256:8f3cd2e254d8f793e7f3d6d9df77b92252b52637291d0f0da013c76ea2724b6c"}, + {file = "six-1.14.0.tar.gz", hash = "sha256:236bdbdce46e6e6a3d61a337c0f8b763ca1e8717c03b369e87a7ec7ce1319c0a"}, +] +sqlalchemy = [ + {file = "SQLAlchemy-1.3.13.tar.gz", hash = "sha256:64a7b71846db6423807e96820993fa12a03b89127d278290ca25c0b11ed7b4fb"}, +] +urllib3 = [ + {file = "urllib3-1.25.8-py2.py3-none-any.whl", hash = "sha256:2f3db8b19923a873b3e5256dc9c2dedfa883e33d87c690d9c7913e1f40673cdc"}, + {file = "urllib3-1.25.8.tar.gz", hash = "sha256:87716c2d2a7121198ebcb7ce7cccf6ce5e9ba539041cfbaeecfb641dc0bf6acc"}, +] +wcwidth = [ + {file = "wcwidth-0.1.8-py2.py3-none-any.whl", hash = "sha256:8fd29383f539be45b20bd4df0dc29c20ba48654a41e661925e612311e9f3c603"}, + {file = "wcwidth-0.1.8.tar.gz", hash = "sha256:f28b3e8a6483e5d49e7f8949ac1a78314e740333ae305b4ba5defd3e74fb37a8"}, +] +werkzeug = [ + {file = "Werkzeug-1.0.0-py2.py3-none-any.whl", hash = "sha256:6dc65cf9091cf750012f56f2cad759fa9e879f511b5ff8685e456b4e3bf90d16"}, + {file = "Werkzeug-1.0.0.tar.gz", hash = "sha256:169ba8a33788476292d04186ab33b01d6add475033dfc07215e6d219cc077096"}, +] +xdg = [ + {file = "xdg-4.0.1-py3-none-any.whl", hash = "sha256:bf9032b027e3061d38c362a21b14dcf057a5b5a4906956f8e8278cefdf73f38b"}, + {file = "xdg-4.0.1.tar.gz", hash = "sha256:c939c99def394cbaf765a3ee55efd6ea7e4c5eaed8d9ebc2d03af84ba35dec57"}, +] diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..bfd8b10 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,23 @@ +[tool.poetry] +name = "homecontrol" +version = "0.1.0" +description = "central application to connect iot devices" +authors = ["Konstantin Koslowski "] +license = "MIT" + +[tool.poetry.dependencies] +python = "^3.8" +requests = "^2.23.0" +flask = "^1.1.1" +dataset = "^1.2.2" +xdg = "^4.0.1" + +[tool.poetry.dev-dependencies] +pytest = "^5.2" + +[tool.poetry.scripts] +homecontrol = "homecontrol.homecontrol:main" + +[build-system] +requires = ["poetry>=0.12"] +build-backend = "poetry.masonry.api"