{ "info": { "author": "Matthew Schinckel", "author_email": "matt@schinckel.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3.6", "Topic :: Home Automation", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Gleeful: HomeKit Automation Protocol\n====================================\n\nThis wraps the very useful `HAP-python` package to make creating new Accessories,\nespecially those with multiple services, really simple.\n\n\nHere is an example::\n\n class Temperature(gleeful.Accessory):\n temperature = gleeful.services.temperature.DS18B20(sensor_id='28-00000000000')\n\n class AccessoryInformation:\n Name = 'Temperature'\n Manufacturer = 'Matthew Schinckel'\n Model = 'DS18B20'\n SerialNumber = '28-00000000000'\n\n\n Temperature(persist_file='/path/to/temperature.state').start()\n\n\nDefining Services\n------------------\n\nServices must inherit from `gleeful.Service` in order for them to be correctly registered\nwith the accessory, and for the service attribute to be correctly determined::\n\n class PIR(gleeful.Service):\n service = 'MotionSensor'\n\n def __init__(self, *args, **kwargs):\n from gpio import MotionSensor\n self.motion = self.service.get_characteristic('MotionDetected')\n self.detector = gpiozero.MotionSensor(kwargs.pop('gpio_pin'))\n super().__init__(*args, **kwargs)\n\n def run(self, sentinel):\n self.detector.when_motion = lambda: self.motion.set_value(True)\n self.detector.when_no_motion = lambda: self.motion.set_value(False)\n\n\nYou will note a few things that are quite important in this example:\n\n* You define the service on tha class as a string: this will be looked up from\n the HAP loader automatically, when using a class the service attribute will\n not be a string, but instead an instance of the HAP service that matches.\n\n* The run method takes an extra argument: the sentinel that can be used to\n trigger repeating code or a stop situation. This is shared between all\n services within an accessory.\n\nWhy use this instead of `HAP-python`?\n--------------------------------------\n\nGleeful makes it easy to have multiple services within a single accessory, and\nencapsulating the logic within the service.\n\nIt also allows for you to serve directly from the accessory, by using `.start()`,\nalthough you may also pass the accessory to a driver if you wish.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/schinckel/gleeful/", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "gleeful", "package_url": "https://pypi.org/project/gleeful/", "platform": "", "project_url": "https://pypi.org/project/gleeful/", "project_urls": { "Homepage": "https://bitbucket.org/schinckel/gleeful/" }, "release_url": "https://pypi.org/project/gleeful/0.1.3/", "requires_dist": null, "requires_python": "", "summary": "HomeKit Accessory Protocol (HAP) wrapper for Python", "version": "0.1.3" }, "last_serial": 3725183, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "bf1cdc278d05fc9292697c0710ffa19e", "sha256": "b2736b6c83b7295dca420ac88c7da80979fdad52710dff1dfc4901e4f0199d9d" }, "downloads": -1, "filename": "gleeful-0.1.0.tar.gz", "has_sig": false, "md5_digest": "bf1cdc278d05fc9292697c0710ffa19e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5050, "upload_time": "2018-03-30T22:29:27", "url": "https://files.pythonhosted.org/packages/42/53/ef3f7659116d39afe762fd9c4dd63d34f8312fa8cd663a49dd2e335a3183/gleeful-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "94daf2c76fc2a612afc8ad3d7092b206", "sha256": "ca0f8d1186c5c34f43ed7b57eb8ab458a3af9ea947fcee24ca9bee20997a056e" }, "downloads": -1, "filename": "gleeful-0.1.1.tar.gz", "has_sig": false, "md5_digest": "94daf2c76fc2a612afc8ad3d7092b206", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5076, "upload_time": "2018-03-30T23:18:40", "url": "https://files.pythonhosted.org/packages/70/08/66c2d55814aa82e119352e6917449a298d9a2f91a7e5f98b6f8d92573f9e/gleeful-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "e1c28535ea644a5325508bccc3fc7c04", "sha256": "ec41fb416b897f122d06ee4f9d3c79dbe0c50b20f489bd1627095ad04992336a" }, "downloads": -1, "filename": "gleeful-0.1.2.tar.gz", "has_sig": false, "md5_digest": "e1c28535ea644a5325508bccc3fc7c04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5053, "upload_time": "2018-04-01T23:04:47", "url": "https://files.pythonhosted.org/packages/ae/97/66d0d0be802c19ed0634efc885b9740e0867e57d1e36223aef8a063083ff/gleeful-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "390fe3747831619d4d1f4325e4a41c13", "sha256": "ad21af2045e258a36baa164824d839d27c03f3e7c5d9d85bb2cf364c24690908" }, "downloads": -1, "filename": "gleeful-0.1.3.tar.gz", "has_sig": false, "md5_digest": "390fe3747831619d4d1f4325e4a41c13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5410, "upload_time": "2018-04-02T00:23:46", "url": "https://files.pythonhosted.org/packages/9b/6b/bbe67b77dd0efe956774b6765a55ed3dbbb73f65c4e79bf5bb15249d4763/gleeful-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "390fe3747831619d4d1f4325e4a41c13", "sha256": "ad21af2045e258a36baa164824d839d27c03f3e7c5d9d85bb2cf364c24690908" }, "downloads": -1, "filename": "gleeful-0.1.3.tar.gz", "has_sig": false, "md5_digest": "390fe3747831619d4d1f4325e4a41c13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5410, "upload_time": "2018-04-02T00:23:46", "url": "https://files.pythonhosted.org/packages/9b/6b/bbe67b77dd0efe956774b6765a55ed3dbbb73f65c4e79bf5bb15249d4763/gleeful-0.1.3.tar.gz" } ] }