{ "info": { "author": "Mark Coombes", "author_email": "mark@markcoombes.ca", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "# pykuna\n\n## Python3 async library for interacting with the Kuna camera mobile API\n\n*Requirements:* aiohttp, asyncio, async_timeout\n\nInstall pykuna with `python3 -m pip install pykuna`.\n\n## Usage\n\npykuna's main class is KunaAPI; create an API object, and authenticate it, like this:\n\n```python\nfrom aiohttp import ClientSession\nfrom pykuna import KunaAPI\n\nwebsession = ClientSession()\n\nkuna = KunaAPI(USERNAME, PASSWORD, websession)\n\nawait kuna.authenticate()\n```\n\nWhere:\n\n- `USERNAME` is the email address you use for the Kuna app; \n- `PASSWORD` is your password for the Kuna app; and,\n- `websession` is an instance of aiohttp.ClientSession().\n\nAfter authenticating, populate (or refresh) a dict of all cameras in the Kuna account (key = camera serial number, value = camera object) by calling the `update()` method on the API object:\n\n```python\nawait kuna.update()\n```\n\n## Methods\n\nThe following methods are available on a camera device object in the KunaAPI.cameras dict; all are async and must be `await`ed:\n\n- `update()` - refresh only that camera's properties from the API.\n- `get_thumbnail()` - returns a camera snapshot as a jpeg image.\n- `set_property(property=state)` - sets a property of the device. Properties currently settable via pykuna are:\n - `bulb_on` (boolean) - set the lightbulb on (true) or off (false)\n - `led_mask` (boolean) - set the status led on the device on (true) or off (false)\n - `volume` (int) - set the speaker volume of the device (minimum 0, maximum 100)\n- `light_on()` - turn on the camera's light bulb\n- `light_off()` - turn off the camera's light bulb\n- `enable_notifications()` - enable Kuna app notifications for the camera\n- `disable_notifications()` - diable Kuna app notifications for the camera\n- `get_recordings_by_time(timedelta)` - returns a python-list of recording objects for the past `datetime.timedelta` time period.\n\n## example.py\n\nAn example script is provided to demonstrate the usage of pykuna; it prints a list of cameras associated with the Kuna account, and retrieves the currently-existing recordings for the camera, printing the timestamp of each recording and its associated download link.\n\n```bash\npython example.py USERNAME PASSWORD\n```\n\n## Caveats\n\npykuna interacts with Kuna's (private) mobile device API, which could change at any time. And, without official documentation or terms of service, there's no way to know what type or rate of usage may result in your account being banned by Kuna. Use carefully!\n\npykuna does not implement timeouts; use asyncio_timeout in your client code to wrap calls to the API as needed.\n\npykuna was inspired by the investigative work of @loghound: https://github.com/loghound/kuna-camera-api, but does not yet implement all known endpoints; this project is primarily intended to interface Home Assistant with the Kuna API, and will be further developed with that goal in mind.\n\npykuna will hit v1.0.0 when it's ready for Home Assistant. Until then, pykuna's API may change at any time!\n\n## Contributing\n\nPlease open issues or pull requests.", "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/marthoc/pykuna", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pykuna", "package_url": "https://pypi.org/project/pykuna/", "platform": "", "project_url": "https://pypi.org/project/pykuna/", "project_urls": { "Homepage": "https://github.com/marthoc/pykuna" }, "release_url": "https://pypi.org/project/pykuna/0.6.0/", "requires_dist": null, "requires_python": "", "summary": "Python3 async library for interacting with the Kuna camera mobile API", "version": "0.6.0" }, "last_serial": 5733895, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "550e63946b7bb1ca067dad2ead9d909e", "sha256": "0b6714c7415ed58d3327c9c7bd409b208d5190f2a53e2bf276ba23ad30a2c449" }, "downloads": -1, "filename": "pykuna-0.1.0.tar.gz", "has_sig": false, "md5_digest": "550e63946b7bb1ca067dad2ead9d909e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4500, "upload_time": "2018-12-10T17:48:23", "url": "https://files.pythonhosted.org/packages/07/40/8aa2b26420fd64a874567a35ec339b004be42bd3e5b9e30608c9fef10d9d/pykuna-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f944d92c4138b37512f30f4f655daa25", "sha256": "3ad213b19bd29e69af095d30d0471e953000e4605934c489a4534ec7a0ad96a1" }, "downloads": -1, "filename": "pykuna-0.2.0.tar.gz", "has_sig": false, "md5_digest": "f944d92c4138b37512f30f4f655daa25", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4536, "upload_time": "2018-12-11T15:31:50", "url": "https://files.pythonhosted.org/packages/52/03/6225823bacbeaad4df41ce96bd530bde9489f885d38cb894da384d5ec5fe/pykuna-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "e830088b6c1c4a2efb3675caff52ac5d", "sha256": "a6bde0eeea9a162d6a7b8928b270fa896cc0f7ee54939bd1b99ce6cc30506627" }, "downloads": -1, "filename": "pykuna-0.3.0.tar.gz", "has_sig": false, "md5_digest": "e830088b6c1c4a2efb3675caff52ac5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4569, "upload_time": "2019-01-28T16:01:20", "url": "https://files.pythonhosted.org/packages/4d/3c/9b81498d540446c7c090b7eb1e8ab412bb51651442205cb6825e63b878a6/pykuna-0.3.0.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "ba2174206082457a8685c839072898ab", "sha256": "59e4afd7fe42c53539aa12cfa4e0b02a35e4032cd9d85b7293abf7cc6111d7d3" }, "downloads": -1, "filename": "pykuna-0.4.0.tar.gz", "has_sig": false, "md5_digest": "ba2174206082457a8685c839072898ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4868, "upload_time": "2019-02-23T20:38:48", "url": "https://files.pythonhosted.org/packages/25/55/207b6329ea7f0c7d62cae32a87d22b2deb1dc3cb6f2a687325b8609f9223/pykuna-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "a81e1842a121d43b4013ea2365a860c1", "sha256": "17c1a07763fa98e41057f7f3e4f1127867344c7843a2d73b4e8fe41fde6d57fc" }, "downloads": -1, "filename": "pykuna-0.5.0.tar.gz", "has_sig": false, "md5_digest": "a81e1842a121d43b4013ea2365a860c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5343, "upload_time": "2019-03-18T21:18:56", "url": "https://files.pythonhosted.org/packages/ae/e7/8adaba91449c3c7ba2745a0852b4e0b203bae50dc5b46004c9372e90442f/pykuna-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "f29be762b9abe3782dc0d3f9ecde23eb", "sha256": "6745f235bd6df5bf7231448aac621f2a9fc5273775e430119f9950b2690e014e" }, "downloads": -1, "filename": "pykuna-0.5.1.tar.gz", "has_sig": false, "md5_digest": "f29be762b9abe3782dc0d3f9ecde23eb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5546, "upload_time": "2019-03-30T21:04:17", "url": "https://files.pythonhosted.org/packages/e9/59/67235f62d6dbca6c4c86194c80680b539a45b8ade61a51f5bff8991d2117/pykuna-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "685c3bfc76927ae724653c81805a8faa", "sha256": "bb02d42d8e21ada21f3bab49f581f53fc122269342b8bdbe34b0bbbee8aba72f" }, "downloads": -1, "filename": "pykuna-0.6.0.tar.gz", "has_sig": false, "md5_digest": "685c3bfc76927ae724653c81805a8faa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5510, "upload_time": "2019-08-27T00:54:34", "url": "https://files.pythonhosted.org/packages/ef/74/b6ce1a422ff060f84431fa79bdcdf72581da6b04ec6b9637104d6c31b92c/pykuna-0.6.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "685c3bfc76927ae724653c81805a8faa", "sha256": "bb02d42d8e21ada21f3bab49f581f53fc122269342b8bdbe34b0bbbee8aba72f" }, "downloads": -1, "filename": "pykuna-0.6.0.tar.gz", "has_sig": false, "md5_digest": "685c3bfc76927ae724653c81805a8faa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5510, "upload_time": "2019-08-27T00:54:34", "url": "https://files.pythonhosted.org/packages/ef/74/b6ce1a422ff060f84431fa79bdcdf72581da6b04ec6b9637104d6c31b92c/pykuna-0.6.0.tar.gz" } ] }