{"id":13678219,"url":"https://github.com/hbldh/bleak","last_synced_at":"2025-05-14T07:01:44.200Z","repository":{"id":37714878,"uuid":"131211505","full_name":"hbldh/bleak","owner":"hbldh","description":"A cross platform Bluetooth Low Energy Client for Python using asyncio","archived":false,"fork":false,"pushed_at":"2025-04-20T04:27:37.000Z","size":2483,"stargazers_count":2031,"open_issues_count":181,"forks_count":315,"subscribers_count":34,"default_branch":"develop","last_synced_at":"2025-05-07T06:17:29.478Z","etag":null,"topics":["asyncio","ble","bluetooth","bluetooth-low-energy","cross-platform","platform-independent","python","python3"],"latest_commit_sha":null,"homepage":"","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":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","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","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-04-26T21:15:45.000Z","updated_at":"2025-05-06T16:42:02.000Z","dependencies_parsed_at":"2023-10-03T09:30:03.585Z","dependency_job_id":"eeca584a-fefd-4f52-ad23-a45c5f70e245","html_url":"https://github.com/hbldh/bleak","commit_stats":{"total_commits":970,"total_committers":70,"mean_commits":"13.857142857142858","dds":0.743298969072165,"last_synced_commit":"63adefa24cb6ed11c8cf154fa41f51ecff1df98c"},"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fbleak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fbleak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fbleak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hbldh%2Fbleak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hbldh","download_url":"https://codeload.github.com/hbldh/bleak/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254092644,"owners_count":22013290,"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":["asyncio","ble","bluetooth","bluetooth-low-energy","cross-platform","platform-independent","python","python3"],"created_at":"2024-08-02T13:00:51.208Z","updated_at":"2025-05-14T07:01:44.155Z","avatar_url":"https://github.com/hbldh.png","language":"Python","funding_links":[],"categories":["Python","Hardware"],"sub_categories":[],"readme":"=====\nBleak\n=====\n\n.. image:: https://github.com/hbldh/bleak/workflows/Build%20and%20Test/badge.svg\n    :target: https://github.com/hbldh/bleak/actions?query=workflow%3A%22Build+and+Test%22\n    :alt: Build and Test\n\n.. image:: https://img.shields.io/pypi/v/bleak.svg\n    :target: https://pypi.python.org/pypi/bleak\n\n.. image:: https://img.shields.io/pypi/dm/bleak.svg\n    :target: https://pypi.python.org/pypi/bleak\n    :alt: PyPI - Downloads\n\n.. image:: https://readthedocs.org/projects/bleak/badge/?version=latest\n    :target: https://bleak.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/psf/black\n\n.. container::\n\n    .. image:: Bleak_logo2.png\n        :target: https://github.com/hbldh/bleak\n        :alt: Bleak Logo\n\nBleak is an acronym for Bluetooth Low Energy platform Agnostic Klient.\n\n* Free software: MIT license\n* Documentation: https://bleak.readthedocs.io.\n\nBleak is a GATT client software, capable of connecting to BLE devices\nacting as GATT servers. It is designed to provide a asynchronous,\ncross-platform Python API to connect and communicate with e.g. sensors.\n\nInstallation\n------------\n\n.. code-block:: bash\n\n    $ pip install bleak\n\nFeatures\n--------\n\n* Supports Windows 10, version 16299 (Fall Creators Update) or greater\n* Supports Linux distributions with BlueZ \u003e= 5.43\n* OS X/macOS support via Core Bluetooth API, from at least OS X version 10.11\n* Android backend compatible with python-for-android\n\nBleak supports reading, writing and getting notifications from\nGATT servers, as well as a function for discovering BLE devices.\n\nUsage\n-----\n\nTo discover Bluetooth devices that can be connected to:\n\n.. code-block:: python\n\n    import asyncio\n    from bleak import BleakScanner\n\n    async def main():\n        devices = await BleakScanner.discover()\n        for d in devices:\n            print(d)\n\n    asyncio.run(main())\n\n\nConnect to a Bluetooth device and read its model number:\n\n.. code-block:: python\n\n    import asyncio\n    from bleak import BleakClient\n\n    address = \"24:71:89:cc:09:05\"\n    MODEL_NBR_UUID = \"2A24\"\n\n    async def main(address):\n        async with BleakClient(address) as client:\n            model_number = await client.read_gatt_char(MODEL_NBR_UUID)\n            print(\"Model Number: {0}\".format(\"\".join(map(chr, model_number))))\n\n    asyncio.run(main(address))\n\nDO NOT NAME YOUR SCRIPT ``bleak.py``! It will cause a circular import error.\n\nSee examples folder for more code, for instance example code for connecting to a\n`TI SensorTag CC2650 \u003chttp://www.ti.com/ww/en/wireless_connectivity/sensortag/\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbldh%2Fbleak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhbldh%2Fbleak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhbldh%2Fbleak/lists"}