{"id":13852527,"url":"https://github.com/hbldh/pymetawear","last_synced_at":"2025-04-14T08:22:08.864Z","repository":{"id":6212619,"uuid":"55058010","full_name":"hbldh/pymetawear","owner":"hbldh","description":"Community developed SDK around the Python bindings for the C++ SDK","archived":false,"fork":false,"pushed_at":"2023-05-30T14:04:42.000Z","size":6078,"stargazers_count":43,"open_issues_count":8,"forks_count":19,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-04-28T22:06:02.639Z","etag":null,"topics":["accelerometer","ble","bluetooth","gyroscope","imu","magnetometer","motion","sensor","sensors","temperature"],"latest_commit_sha":null,"homepage":"https://hbldh.github.io/pymetawear/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hbldh.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst"}},"created_at":"2016-03-30T11:37:55.000Z","updated_at":"2024-02-07T08:08:40.000Z","dependencies_parsed_at":"2024-01-15T09:07:21.960Z","dependency_job_id":"b4e31c0c-7e2f-4d2b-8126-dfc5edc9e867","html_url":"https://github.com/hbldh/pymetawear","commit_stats":{"total_commits":239,"total_committers":15,"mean_commits":"15.933333333333334","dds":0.4351464435146444,"last_synced_commit":"5e49dc1671ce395b52ab4d1766720aa03e09f631"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fpymetawear","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fpymetawear/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fpymetawear/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fpymetawear/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hbldh","download_url":"https://codeload.github.com/hbldh/pymetawear/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248844093,"owners_count":21170512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["accelerometer","ble","bluetooth","gyroscope","imu","magnetometer","motion","sensor","sensors","temperature"],"created_at":"2024-08-04T22:01:24.506Z","updated_at":"2025-04-14T08:22:08.822Z","avatar_url":"https://github.com/hbldh.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"==========\nPyMetaWear\n==========\n\n.. image:: https://img.shields.io/pypi/v/pymetawear\n    :target: https://pypi.org/project/pymetawear/\n\n.. image:: https://img.shields.io/pypi/l/pymetawear\n    :alt: PyPI - License\n\n.. image:: https://dev.azure.com/hbldh/github/_apis/build/status/hbldh.pymetawear?branchName=master\n    :target: https://dev.azure.com/hbldh/github/_build/latest?definitionId=1?branchName=master\n\n.. image:: https://coveralls.io/repos/github/hbldh/pymetawear/badge.svg?branch=master\n    :target: https://coveralls.io/github/hbldh/pymetawear?branch=master\n\n**PyMetaWear is a community developed Python SDK started by**\n`Henrik Blidh \u003chttps://github.com/hbldh\u003e`_ **. MbientLab does not provide support for this SDK.**\n\nPython package for connecting to and using\n`MbientLab's MetaWear \u003chttps://mbientlab.com/\u003e`_ boards.\n\nPyMetaWear can, from version 0.11.0, be used from both Windows and Linux. This is thanks to that the\n``metawear`` `package \u003chttps://github.com/mbientlab/MetaWear-SDK-Python\u003e`_ package is now depending on a\nnew BLE library called `PyWarble \u003chttps://github.com/mbientlab/PyWarble\u003e`_ instead of ``gattlib``.\nSee installation instructions for more details about how to make it build on Windows.\n\nCapabilities and Limitations\n----------------------------\n\nPyMetaWear was previously a wrapper around the\n`MetaWear C++ API \u003chttps://github.com/mbientlab/Metawear-CppAPI\u003e`_,\nproviding a more Pythonic interface. In version 0.9.0 it instead becomes\na wrapper around `MetaWear's official Python SDK \u003chttps://github.com/mbientlab/MetaWear-SDK-Python\u003e`_,\ndoing the very same thing. The official SDK handles the actual board\nconnections and communication while PyMetaWear aims to remove the low level\nfeeling of interacting with the MetaWear board.\n\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install pymetawear\n\nSince version 0.11.0, the installation requirements for ``pymetawear`` has changed. See\n`documentation \u003chttps://hbldh.github.io/pymetawear/\u003e`_ for details on requirements for Linux and Windows respectively.\n\nDocumentation\n-------------\n\nAvailable in the `Github pages \u003chttps://hbldh.github.io/pymetawear/\u003e`_ of this repository.\n\nBasic Usage\n-----------\n\nThe MetaWear client can be used in two ways: either as Pythonic\nconvenience class for handling a MetaWear board or as\na simple communication client governed by the ``libmetawear`` C++ library.\n\nCreating a client, and thus also setting up a Bluetooth connection to the\nMetaWear board, is equal for both the two usage profiles:\n\n.. code-block:: python\n\n    from pymetawear.client import MetaWearClient\n    c = MetaWearClient('DD:3A:7D:4D:56:F0')\n\nExample\n~~~~~~~\n\nBlinking with the LED lights can be done like this with the\nconvenience methods:\n\n.. code-block:: python\n\n    pattern = c.led.load_preset_pattern('blink', repeat_count=10)\n    c.led.write_pattern(pattern, 'g')\n    c.led.play()\n\nor like this using the raw ``libmetawear`` shared library:\n\n.. code-block:: python\n\n    from ctypes import byref\n    from pymetawear import libmetawear\n    from mbientlab.metawear.cbindings import LedColor, LedPreset\n\n    pattern = Led.Pattern(repeat_count=10)\n    libmetawear.mbl_mw_led_load_preset_pattern(byref(pattern), LedPreset.BLINK)\n    libmetawear.mbl_mw_led_write_pattern(c.board, byref(pattern), LedColor.GREEN)\n    libmetawear.mbl_mw_led_play(c.board)\n\nBluetooth Low Energy Scanning\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nActual addresses to your MetaWear board can be found by scanning with the included ``discover_devices`` method:\n\n.. code-block:: python\n\n    from pymetawear.discover import discover_devices\n    out = discover_devices()\n    print(out)\n    [(u'DD:3A:7D:4D:56:F0', u'MetaWear'), (u'FF:50:35:82:3B:5A', u'MetaWear')]\n\nSee the examples folder for more examples on how to use the ``libmetawear``\nlibrary with this client.\n\nModules\n+++++++\n\nAll functionality of the MetaWear C++ API is able to be used using the\nPyMetaWear client, and some of the modules have had convenience methods\nadded to simplify the use of them. Below is a list of modules which\nhave had their convenience methods written and one of modules that are\nawaiting such focus.\n\n================= =====================\nCompleted Modules Unimplemented Modules\n================= =====================\nAccelerometer     GPIO\nGyroscope         NeoPixel\nHaptic            Color Detector\nSwitch            Humidity\nLED               iBeacon\nBarometer         I2C\nMagnetometer\nTemperature\nSettings\nAmbient Light\n================= =====================\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbldh%2Fpymetawear","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhbldh%2Fpymetawear","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbldh%2Fpymetawear/lists"}