{ "info": { "author": "Jacob Alexander", "author_email": "haata@kiibohd.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries" ], "description": "# hidio core Client Python Library\nHID-IO Core Client Side Library for Python\n\n[![Linux Status](https://github.com/hid-io/hid-io-core/workflows/Rust%20Linux/badge.svg)](https://github.com/hid-io/hid-io-core/actions)\n[![macOS Status](https://github.com/hid-io/hid-io-core/workflows/Rust%20macOS/badge.svg)](https://github.com/hid-io/hid-io-core/actions)\n[![Windows Status](https://github.com/hid-io/hid-io-core/workflows/Rust%20Windows/badge.svg)](https://github.com/hid-io/hid-io-core/actions)\n\n[![Visit our IRC channel](https://kiwiirc.com/buttons/irc.freenode.net/hid-io.png)](https://kiwiirc.com/client/irc.freenode.net/#hid-io)\n\n## Getting\n\n```bash\npip install hidiocore\n```\n\n\n## Overview\n\nThis is a convenience Python library for the HID-IO daemon which handles automatic reconnection if the server goes down for any reason.\nThe library also handles the HID-IO authentication procedure (key negotiation and TLS wrapping).\n\n\n## Usage\n\n```python\nimport asyncio\nimport sys\n\nimport hidiocore.client\n\n# Optional callbacks\nclass MyHIDIOClient(hidiocore.client.HIDIOClient):\n async def on_connect(self, cap):\n print(\"Connected!\")\n print(\"Connected API Call\", await cap.alive().a_wait())\n\n\n async def on_disconnect(self):\n print(\"Disconnected!\")\n\n\nasync def main():\n client = MyHIDIOClient('Python example.py')\n # Connect the client to the server using a background task\n # This will automatically reconnect\n tasks = [asyncio.gather(*[client.connect(auth=hidiocore.client.HIDIOClient.AUTH_BASIC)], return_exceptions=True)]\n while client.retry_connection_status():\n if client.capability_hidioserver():\n try:\n print(\"API Call\", await asyncio.wait_for(\n client.capability_hidioserver().alive().a_wait(),\n timeout=2.0\n ))\n print(\"API Call\", await asyncio.wait_for(\n client.capability_authenticated().nodes().a_wait(),\n timeout=2.0\n ))\n except asyncio.TimeoutError:\n print(\"Alive timeout.\")\n continue\n await asyncio.sleep(5)\n\n\ntry:\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\nexcept KeyboardInterrupt:\n print(\"Ctrl+C detected, exiting...\")\n sys.exit(1)\n```\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://hid-io.com", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "hidiocore", "package_url": "https://pypi.org/project/hidiocore/", "platform": "", "project_url": "https://pypi.org/project/hidiocore/", "project_urls": { "Homepage": "http://hid-io.com" }, "release_url": "https://pypi.org/project/hidiocore/0.1.0b3/", "requires_dist": [ "cython>=0.29", "pycapnp-async>=0.7", "pygtail>=0.11.1" ], "requires_python": ">=3.7", "summary": "HID-IO Python Library", "version": "0.1.0b3", "yanked": false, "yanked_reason": null }, "last_serial": 6212866, "releases": { "0.1.0b2": [ { "comment_text": "", "digests": { "md5": "c0a8fda5d7f7cb02e4ee210bfa5b27c7", "sha256": "9bd249a9ebeb3e57531c6d7b2c1ad917d5457084ee8ab92393e00b9054d23978" }, "downloads": -1, "filename": "hidiocore-0.1.0b2-py3-none-any.whl", "has_sig": false, "md5_digest": "c0a8fda5d7f7cb02e4ee210bfa5b27c7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 28269, "upload_time": "2019-10-22T06:11:26", "upload_time_iso_8601": "2019-10-22T06:11:26.382779Z", "url": "https://files.pythonhosted.org/packages/ab/72/8a582a710677e93f01687f2f5b78760cb2767f6c9a2bf6ef428041e5a135/hidiocore-0.1.0b2-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "e1e0a9c54552a39aa9ab22910e4e9023", "sha256": "87d4cc978bbfb588cdcecc59f9477eb5218a0b3b6f5303adfb03d7214be74600" }, "downloads": -1, "filename": "hidiocore-0.1.0b2.tar.gz", "has_sig": false, "md5_digest": "e1e0a9c54552a39aa9ab22910e4e9023", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11131, "upload_time": "2019-10-22T06:11:32", "upload_time_iso_8601": "2019-10-22T06:11:32.822777Z", "url": "https://files.pythonhosted.org/packages/27/19/be35c5505e3bea86c202320be49e2785e7d6ae83bc80e50c1369ea70dd8a/hidiocore-0.1.0b2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.0b3": [ { "comment_text": "", "digests": { "md5": "a5712ddb7448bbe97df990bdaefbfd87", "sha256": "7d0772b548a0a82d569975f31ff26e33c5ba51889a60c85aa3f7b923d4257926" }, "downloads": -1, "filename": "hidiocore-0.1.0b3-py3-none-any.whl", "has_sig": false, "md5_digest": "a5712ddb7448bbe97df990bdaefbfd87", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 35774, "upload_time": "2019-11-28T08:24:02", "upload_time_iso_8601": "2019-11-28T08:24:02.032787Z", "url": "https://files.pythonhosted.org/packages/8d/a3/a0b1ff2a431d2e2dc37079f46baa52871e510b026e8b99014c4f7e817f0d/hidiocore-0.1.0b3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "2bbe11f6b01aa2a055d64e4fa25b2dfe", "sha256": "aa5c10899496d28e7633632c575cec0d90b55e87ff7daad2e92443aac73239d5" }, "downloads": -1, "filename": "hidiocore-0.1.0b3.tar.gz", "has_sig": false, "md5_digest": "2bbe11f6b01aa2a055d64e4fa25b2dfe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12840, "upload_time": "2019-11-28T08:24:07", "upload_time_iso_8601": "2019-11-28T08:24:07.339335Z", "url": "https://files.pythonhosted.org/packages/9a/85/ff61ef3643a112cde75fc77d978d9e697f99ad550a4ea32775a62e34cabb/hidiocore-0.1.0b3.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a5712ddb7448bbe97df990bdaefbfd87", "sha256": "7d0772b548a0a82d569975f31ff26e33c5ba51889a60c85aa3f7b923d4257926" }, "downloads": -1, "filename": "hidiocore-0.1.0b3-py3-none-any.whl", "has_sig": false, "md5_digest": "a5712ddb7448bbe97df990bdaefbfd87", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 35774, "upload_time": "2019-11-28T08:24:02", "upload_time_iso_8601": "2019-11-28T08:24:02.032787Z", "url": "https://files.pythonhosted.org/packages/8d/a3/a0b1ff2a431d2e2dc37079f46baa52871e510b026e8b99014c4f7e817f0d/hidiocore-0.1.0b3-py3-none-any.whl", "yanked": false, "yanked_reason": null }, { "comment_text": "", "digests": { "md5": "2bbe11f6b01aa2a055d64e4fa25b2dfe", "sha256": "aa5c10899496d28e7633632c575cec0d90b55e87ff7daad2e92443aac73239d5" }, "downloads": -1, "filename": "hidiocore-0.1.0b3.tar.gz", "has_sig": false, "md5_digest": "2bbe11f6b01aa2a055d64e4fa25b2dfe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12840, "upload_time": "2019-11-28T08:24:07", "upload_time_iso_8601": "2019-11-28T08:24:07.339335Z", "url": "https://files.pythonhosted.org/packages/9a/85/ff61ef3643a112cde75fc77d978d9e697f99ad550a4ea32775a62e34cabb/hidiocore-0.1.0b3.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }