{ "info": { "author": "Niklas Rosenstein", "author_email": "rosensteinniklas@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "## Announcements\n\n> [Oct 15, 2018] Thalmic Labs have announced the discontinuation of the Myo\n> armband.\n\n> [Jun 28, 2018] Myo-Python 1.0 has been released. It comes with a number of\n> API changes. If you have been following an older tutorial, you might have\n> the new version installed but use code that worked with the old version. \n> Check the [Migrating from v0.2.x](#migrating-from-v02x) section below.\n\n---\n\n

\n \n \n

\n

\n \n \n \n

\n

Python bindings for the Myo SDK

\n\nMyo-Python is a [CFFI] wrapper for the [Thalmic Myo SDK].\n\n__Table of Contents__\n\n* [Documentation](#documentation)\n* [Example](#example)\n* [Migrating from v0.2.x](#migrating-from-v02x)\n* [Projects using Myo-Python](#projects-using-myo-python)\n\n[CFFI]: https://pypi.python.org/pypi/cffi\n[Thalmic Myo SDK]: https://developer.thalmic.com/downloads\n\n### Documentation\n\nThe documentation can currently be found in the `docs/` directory in the\n[GitHub Repository](https://github.com/NiklasRosenstein/myo-python).\n\n### Example\n\nMyo-Python mirrors the usage of the Myo C++ SDK in many ways as it also\nrequires you to implement a `DeviceListener` that will then be invoked for\nany events received from a Myo device.\n\n```python\nimport myo\n\nclass Listener(myo.DeviceListener):\n def on_paired(self, event):\n print(\"Hello, {}!\".format(event.device_name))\n event.device.vibrate(myo.VibrationType.short)\n def on_unpaired(self, event):\n return False # Stop the hub\n def on_orientation(self, event):\n orientation = event.orientation\n acceleration = event.acceleration\n gyroscope = event.gyroscope\n # ... do something with that\n\nif __name__ == '__main__':\n myo.init(sdk_path='./myo-sdk-win-0.9.0/')\n hub = myo.Hub()\n listener = Listener()\n while hub.run(listener.on_event, 500):\n pass\n```\n\nAs an alternative to implementing a custom device listener, you can instead\nuse the `myp.ApiDeviceListener` class which allows you to read the most recent\nstate of one or multiple Myo devices.\n\n```python\nimport myo\nimport time\n\ndef main():\n myo.init(sdk_path='./myo-sdk-win-0.9.0/')\n hub = myo.Hub()\n listener = myo.ApiDeviceListener()\n with hub.run_in_background(listener.on_event):\n print(\"Waiting for a Myo to connect ...\")\n device = listener.wait_for_single_device(2)\n if not device:\n print(\"No Myo connected after 2 seconds.\")\n return\n print(\"Hello, Myo! Requesting RSSI ...\")\n device.request_rssi()\n while hub.running and device.connected and not device.rssi:\n print(\"Waiting for RRSI...\")\n time.sleep(0.001)\n print(\"RSSI:\", device.rssi)\n print(\"Goodbye, Myo!\")\n```\n\n### Migrating from v0.2.x\n\nThe v0.2.x series of the Myo-Python library used `ctypes` and has a little\nbit different API. The most important changes are:\n\n* The `Hub` object no longer needs to be shut down explicitly\n* The `DeviceListener` method names changed to match the exact event name\n as specified by the Myo SDK (eg. from `on_pair()` to `on_paired()`)\n* `Hub.run()`: The order of arguments is reversed (`handler, duration_ms`\n instead of `duration_ms, handler`)\n* `myo.init()`: Provides a few more parameters to control the way `libmyo` is detected.\n* `myo.Feed`: Renamed to `myo.ApiDeviceListener`\n\n### Projects using Myo-Python\n\n- [Myo Matlab](https://github.com/yijuilee/myomatlab)\n\n### Changes\n\n#### v1.0.4 (2019-04-29)\n\n- Remove myo.quaternion, it was a leftover and the Quaternion class was actually in myo.types.math\n- move myo.types.math and myo.types.macaddr to myo package instead\n- myo.types package is now a stub for backwards compatibility\n- Depend on `enum34` package instead of `nr.types.enum` which has been removed in `nr.types>=2.0.0`\n- Update the error message of a `ValueError` raised in `myo.init()`\n\n#### v1.0.3 (2018-06-28)\n\n- `Event.mac_address` now returns `None` if the event's type is `EventType.emg` (#62)\n- `Hub.run()` now accepts `DeviceListener` objects for its *handler* parameter.\n This carries over to `Hub.run_forever()` and `Hub.run_in_background()`.\n- Replace requirement `nr>=2.0.10,<3` in favor of `nr.types>=1.0.3`\n\n#### v1.0.2 (2018-06-09)\n\n- Fix `Event.warmup_result` (PR #58 @fribeiro1)\n\n#### v1.0.1 (2018-06-09)\n\n- Fix `Event.rotation_on_arm` (#59)\n\n#### v1.0.0 (2018-06-03)\n\n- Rewrite using CFFI\n\n----\n\n

This project is licensed under the MIT License.
\nCopyright © 2015-2018 Niklas Rosenstein

", "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/NiklasRosenstein/myo-python", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "myo-python", "package_url": "https://pypi.org/project/myo-python/", "platform": "", "project_url": "https://pypi.org/project/myo-python/", "project_urls": { "Homepage": "https://github.com/NiklasRosenstein/myo-python" }, "release_url": "https://pypi.org/project/myo-python/1.0.4/", "requires_dist": null, "requires_python": "", "summary": "Python bindings for the Thalmic Labs Myo SDK", "version": "1.0.4" }, "last_serial": 5207365, "releases": { "0.2.1": [ { "comment_text": "", "digests": { "md5": "57968b9c8d214f682cae5938c0a46021", "sha256": "00fc93113a0771a220ab57b2eb393b546d1f296c2afaf1472b6a5820c798c90a" }, "downloads": -1, "filename": "myo-python-0.2.1.zip", "has_sig": false, "md5_digest": "57968b9c8d214f682cae5938c0a46021", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32501, "upload_time": "2016-01-04T02:34:19", "url": "https://files.pythonhosted.org/packages/d1/eb/5a9d7a16c66919b10512ba034b4471947207e083ab588c9ab6f4085d25e7/myo-python-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "dc1faacce881a672878f2435b18807c4", "sha256": "ac49c36a17416cc5beefe4bb29d9b7dd14c6f17f22a64da26bc53446c4f65c79" }, "downloads": -1, "filename": "myo-python-0.2.2.zip", "has_sig": false, "md5_digest": "dc1faacce881a672878f2435b18807c4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 42291, "upload_time": "2016-01-04T02:39:45", "url": "https://files.pythonhosted.org/packages/4d/ca/de61e8bd60db4bf0da44ce022b549e4fc3ad5f77472259a0d1ea9a89e51a/myo-python-0.2.2.zip" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "e04bcfa9bb8d37a7dd9ed1245c88b3b3", "sha256": "9e8f54c321d779657672dafd87ac6549746484e95141f36f52b10d93e2af33fd" }, "downloads": -1, "filename": "myo-python-0.2.3.tar.gz", "has_sig": false, "md5_digest": "e04bcfa9bb8d37a7dd9ed1245c88b3b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27315, "upload_time": "2018-04-30T17:42:17", "url": "https://files.pythonhosted.org/packages/20/71/54bbd8a0fd6f1d30dee216c085f9747464ccfa878b3747571f4467aa0c5e/myo-python-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "903a0767c257aee1340129155e8591bc", "sha256": "05fb45097484baf09c20e3edc0a6b426548a663c78783cf490fbbcea39bc58da" }, "downloads": -1, "filename": "myo-python-0.2.4.tar.gz", "has_sig": false, "md5_digest": "903a0767c257aee1340129155e8591bc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27798, "upload_time": "2018-06-03T15:13:59", "url": "https://files.pythonhosted.org/packages/69/59/ff42c9ae05896ad99d264716d56210936263d9344fe8e47111757f5a0c80/myo-python-0.2.4.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "7e8aeab3be8686a07f565f630390083c", "sha256": "f55cca70ebf0e8ad80e19d20e99c6225e1686387b3a7ee5e60f76e8dc57ed282" }, "downloads": -1, "filename": "myo-python-1.0.0.tar.gz", "has_sig": false, "md5_digest": "7e8aeab3be8686a07f565f630390083c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17147, "upload_time": "2018-06-03T15:27:57", "url": "https://files.pythonhosted.org/packages/77/3d/c7eb45558990d69f136416129ef7d5f05399bf1a24fc4437845a7519590a/myo-python-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ed81352350cf6c718b18a165de8fbbb2", "sha256": "2edb69f540a470a0b242582698745cae7e7ac7e7e9ca6d0bfba4cb35e777cf8a" }, "downloads": -1, "filename": "myo-python-1.0.1.tar.gz", "has_sig": false, "md5_digest": "ed81352350cf6c718b18a165de8fbbb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17245, "upload_time": "2018-06-09T17:11:27", "url": "https://files.pythonhosted.org/packages/e4/55/77dd5f8643266e43d33f699b6eb9af50b8fe506312ad4735fd2ec5a0e9ac/myo-python-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "70dfea65407e7a8c95a130bca287be07", "sha256": "8ce659aa97abc6f1283c17f9d629afa32a685c5de5cfe9017dab317fd1ed1520" }, "downloads": -1, "filename": "myo-python-1.0.2.tar.gz", "has_sig": false, "md5_digest": "70dfea65407e7a8c95a130bca287be07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17277, "upload_time": "2018-06-09T17:15:48", "url": "https://files.pythonhosted.org/packages/f2/32/929e56a45c16e64566eadebae1349d5ac2f2c844d30e0bdb46cbc38ac727/myo-python-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "4c561e66238a59861b76d34d5afb3581", "sha256": "cbdacf2fbd543294a03c4d55262b193bae1b8b0aea93202541a5177ec386ba8d" }, "downloads": -1, "filename": "myo-python-1.0.3.tar.gz", "has_sig": false, "md5_digest": "4c561e66238a59861b76d34d5afb3581", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17450, "upload_time": "2018-06-28T15:19:42", "url": "https://files.pythonhosted.org/packages/de/0c/4fd35d8d3840760b1ead18d18c5a96e779b04420e4f50860c1ade3226c56/myo-python-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "008e1d0a96e2e0bc01b95a37a9cc2845", "sha256": "bfa54b6e4ead1ce13296fa6fd6bf88dd0f12922144bb41786bb4b71e78ace563" }, "downloads": -1, "filename": "myo-python-1.0.4.tar.gz", "has_sig": false, "md5_digest": "008e1d0a96e2e0bc01b95a37a9cc2845", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19743, "upload_time": "2019-04-30T09:21:33", "url": "https://files.pythonhosted.org/packages/ee/43/9b931077a9e6d961f8c87b9a330679f3440b9c24a6624c039a74fe331d9b/myo-python-1.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "008e1d0a96e2e0bc01b95a37a9cc2845", "sha256": "bfa54b6e4ead1ce13296fa6fd6bf88dd0f12922144bb41786bb4b71e78ace563" }, "downloads": -1, "filename": "myo-python-1.0.4.tar.gz", "has_sig": false, "md5_digest": "008e1d0a96e2e0bc01b95a37a9cc2845", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19743, "upload_time": "2019-04-30T09:21:33", "url": "https://files.pythonhosted.org/packages/ee/43/9b931077a9e6d961f8c87b9a330679f3440b9c24a6624c039a74fe331d9b/myo-python-1.0.4.tar.gz" } ] }