---
title: "bleak | pypx"
description: "Bluetooth Low Energy platform Agnostic Klient"
canonical_url: "https://pypx.app/packages/bleak"
meta:
  "og:description": "Bluetooth Low Energy platform Agnostic Klient"
  "og:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_bleak%2Cversion_3.1.0%2Csummary_Bluetooth%2BLow%2BEnergy%2Bplatform%2BAgnostic%2BKlient%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9ibGVhayI%2Cs_pCFhZMj43zqEkVWP.png"
  "og:image:height": "630"
  "og:image:type": image/png
  "og:image:width": "1200"
  "og:title": "bleak 3.1.0"
  "twitter:image": "https://pypx.app/_og/d/h_630%2Cc_PackageCard%2Cname_bleak%2Cversion_3.1.0%2Csummary_Bluetooth%2BLow%2BEnergy%2Bplatform%2BAgnostic%2BKlient%2Clicense_MIT%2Cp_Ii9wYWNrYWdlcy9ibGVhayI%2Cs_pCFhZMj43zqEkVWP.png"
---

> Index of every page on this site: [llms.txt](https://pypx.app/llms.txt)

# **bleak**

v3.1.0

Bluetooth Low Energy platform Agnostic Klient

172 KB Python 3.10+ py3-none-anyMIT15 deps

[** Diff **](https://pypx.app/packages/bleak/diff)

`$ uv add bleak`

=====

# Bleak

![Build and Test](https://github.com/hbldh/bleak/workflows/Build%20and%20Test/badge.svg) ![PyPI - Downloads](https://img.shields.io/pypi/dm/bleak.svg) ![Documentation Status](https://readthedocs.org/projects/bleak/badge/?version=latest)

.. image:: Bleak\_logo2.png :target: https://github.com/hbldh/bleak :alt: Bleak Logo

Bleak is an acronym for Bluetooth Low Energy platform Agnostic Klient.

- Free software: MIT license
- Documentation: https://bleak.readthedocs.io.

Bleak is a GATT client software, capable of connecting to BLE devices acting as GATT servers. It is designed to provide a asynchronous, cross-platform Python API to connect and communicate with e.g. sensors.

## Installation

```bash
$ pip install bleak
```

## Features

- Supports Windows 11, version 22000 and greater
- Supports Linux distributions with BlueZ >= 5.55
- OS X/macOS support via Core Bluetooth API, from at least OS X version 10.15
- Android backend compatible with python-for-android

Bleak supports reading, writing and getting notifications from GATT servers, as well as a function for discovering BLE devices.

## Usage

To discover Bluetooth devices that can be connected to:

```python
import asyncio
from bleak import BleakScanner

async def main():
    devices = await BleakScanner.discover()
    for d in devices:
        print(d)

asyncio.run(main())
```

Connect to a Bluetooth device and read its model number:

```python
import asyncio
from bleak import BleakClient

address = "24:71:89:cc:09:05"
MODEL_NBR_UUID = "2A24"

async def main(address):
    async with BleakClient(address) as client:
        model_number = await client.read_gatt_char(MODEL_NBR_UUID)
        print(f"Model Number: {model_number.decode()}")

asyncio.run(main(address))
```

DO NOT NAME YOUR SCRIPT bleak.py! It will cause a circular import error.

See examples folder for more code, for instance example code for connecting to a [TI SensorTag CC2650](http://www.ti.com/ww/en/wireless_connectivity/sensortag/)

## **Details **

<dl>

<dt>Version</dt>
<dd>3.1.0</dd>

<dt>License</dt>
<dd>MIT</dd>

<dt>Python</dt>
<dd>&gt;=3.10</dd>

<dt>Maintainer</dt>
<dd>Henrik Blidh</dd></dl>

## **Links**

- [Changelog](https://github.com/hbldh/bleak/blob/develop/CHANGELOG.rst)
- [Documentation](https://bleak.readthedocs.io)
- [Homepage](https://github.com/hbldh/bleak)
- [Issues](https://github.com/hbldh/bleak/issues)
- [Support](https://github.com/hbldh/bleak/discussions)
- [View on PyPI](https://pypi.org/project/bleak/)

## **Release Cadence **

**6**

releases in the past year

avg 52 days between releases

## **Maintainers **

- Henrik Blidh · [henrik.blidh@nedomkull.com](mailto:henrik.blidh@nedomkull.com)

```json
{"@context":"https://schema.org","@graph":[{"@id":"https://pypx.app/#website","@type":"WebSite","description":"The Python Package Index, reimagined. Fast search, dependency insights, download trends, and changelogs — all in one place.","name":"pypx","url":"https://pypx.app/"},{"@id":"https://pypx.app/packages/bleak#webpage","@type":"WebPage","description":"Bluetooth Low Energy platform Agnostic Klient","name":"bleak","url":"https://pypx.app/packages/bleak","isPartOf":{"@id":"https://pypx.app/#website"},"potentialAction":[{"@type":"ReadAction","target":["https://pypx.app/packages/bleak"]}]},{"@id":"https://pypx.app/packages/bleak#/schema/software-application/1","@type":"SoftwareApplication","applicationCategory":"DeveloperApplication","description":"Bluetooth Low Energy platform Agnostic Klient","license":"MIT","name":"bleak","softwareVersion":"3.1.0"}]}
```

## Sitemap

See the full [sitemap](https://pypx.app/sitemap.md) for all pages.
