{ "info": { "author": "Takeyuki UEDA", "author_email": "gde00107@nifty.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Programming Language :: Python", "Topic :: Terminals" ], "description": "# sensorhandler\nMultipurpose sensorhandler, read the value from source & do somethings (send, save, trigger, ...) with it, as configed.\n\n## install\n\n```bash:\npip install sensorhandler\n```\n\n## input\nconfig.toml file on the current working directory. The contents of File is as follows:\n\n```\n[[sources]]\n name = \"dht22\"\n errorhandler = \"errorhandler\"\n [[sources.values]]\n name = \"temp\"\n handlers = [\n \"send\"#import os, \"save\"\n ]\n [[sources.values]]\n name = \"humidity\"\n handlers = [\n \"send\"#, \"save\"\n ]\n [[sources.values]]\n name = \"humiditydeficit\"\n handlers = [\n \"send\"#, \"save\"\n ]\n\n\n[[sources]]\n name = \"mh-z19\"\n [[sources.values]]\n name = \"co2\"\n handlers = [\n \"send\", \"save\"\n ]\n```\n\nThe array of table ***sources*** is the array of data source sensor definition, consist of followings:\n\n- name: Sensor handler's name. The same name python file (with \".py\" extention) will be dinamically imported and function ***read()*** on the imported module will be called. The return value of read() is expecte as a dictionally as key of value name and value like:\n``` {'humiditydeficit': '15.9', 'temp': 26.8, 'humidity': 37.6}```\n\n- values: handler difitition for each value, corresponding to the key of the dictionally of the return value of read() function.\n - name: value name\n \n - handlers: Value handler's name. The same name python file (with \".py\" extention) will be dinamically imported and function ***handle(data_source_name, data_name, value):*** will be called with the Sensor handler's name, value name, and sensor value.\n \n- errorhandler: Error handler's name. The same name python file (with \".py\" extention) will be dinamically imported for error handling of Sensor value reading. Currently, just stab.\n\n## How to use \n### as python program.\n\n```bash:\npython -m sensorhandler [--config config_file_path] [--imppath python_module_import_path] [ --list_imppath list_of_python_module_import_path]\n```\nIn case no --config, \"config.toml\" on the running path is used.\nThe path specified by --imppath and --list_imppath is used ad additional Python import library path.\n\n### as python library.\n\n```python:\nimport sensorhandler\n\nprint (sensorhandler.read(config_file_path))\n```\n\n### history\n- 0.1.1 2018.09.28 first version confirmed Raspberry Pi model B2+\n- 0.1.2 2018.09.29 add config_file_path\n- 0.1.3 2018.09.29 add --config, --imppath, --list_imppath", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/UedaTakeyuki/sensorhandler", "keywords": "testing,logging,example", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "sensorhandler", "package_url": "https://pypi.org/project/sensorhandler/", "platform": "", "project_url": "https://pypi.org/project/sensorhandler/", "project_urls": { "Homepage": "https://github.com/UedaTakeyuki/sensorhandler" }, "release_url": "https://pypi.org/project/sensorhandler/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "Multipurpose sensorhandler, read the value from source & do somethings (send, save, trigger, ...) with it, as configed.", "version": "0.1.3" }, "last_serial": 4322274, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "e2ca63d2dbb592d61c8a423b92f4a346", "sha256": "49c6b6ec3f4232946148b28458589e86f95af3f5a295172a8162cdc44386740d" }, "downloads": -1, "filename": "sensorhandler-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e2ca63d2dbb592d61c8a423b92f4a346", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2752, "upload_time": "2018-09-28T07:35:22", "url": "https://files.pythonhosted.org/packages/0a/30/016675da83b01a7d698902268bae28e624033edde15018bf369828f0751e/sensorhandler-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b8dded6bb29bcc9de86e058bb2650936", "sha256": "4f5c0530ce0738d0afc1b13c354c6ca23445740652c2deaeb4e2868bb9274b27" }, "downloads": -1, "filename": "sensorhandler-0.1.2.tar.gz", "has_sig": false, "md5_digest": "b8dded6bb29bcc9de86e058bb2650936", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2756, "upload_time": "2018-09-29T05:12:16", "url": "https://files.pythonhosted.org/packages/8f/f3/89c1ed12929ce2529af75be651c7c0e3c992660e41f9cd2b208447c35b28/sensorhandler-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "09190f585cd89e0a1981a96ecf93da5f", "sha256": "afeb03aa3f3c285cb8b80f90bfaeaa2086693c09dd797b6235619d0d86ad2ac1" }, "downloads": -1, "filename": "sensorhandler-0.1.3.tar.gz", "has_sig": false, "md5_digest": "09190f585cd89e0a1981a96ecf93da5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3072, "upload_time": "2018-09-29T08:49:12", "url": "https://files.pythonhosted.org/packages/8c/23/e8d92cefca68a1d18a94c8ea7ea018404662d955eb2476227fa1bd2d0abc/sensorhandler-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "09190f585cd89e0a1981a96ecf93da5f", "sha256": "afeb03aa3f3c285cb8b80f90bfaeaa2086693c09dd797b6235619d0d86ad2ac1" }, "downloads": -1, "filename": "sensorhandler-0.1.3.tar.gz", "has_sig": false, "md5_digest": "09190f585cd89e0a1981a96ecf93da5f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3072, "upload_time": "2018-09-29T08:49:12", "url": "https://files.pythonhosted.org/packages/8c/23/e8d92cefca68a1d18a94c8ea7ea018404662d955eb2476227fa1bd2d0abc/sensorhandler-0.1.3.tar.gz" } ] }