Metadata-Version: 2.4
Name: bleak-py
Version: 0.1.20
License-File: LICENSE
Summary: A cross-platform BLE library based on btleplug.
Home-Page: https://github.com/jesses2025smith/bleak-rs
Author: Jesse Smith
License: MIT
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: homepage, https://github.com/jesses2025smith/bleak-rs/tree/py
Project-URL: repository, https://github.com/jesses2025smith/bleak-rs

## Overview

This project is built on top of the `btleplug` library for Bluetooth Low Energy functionality.

## Dependencies

This project depends on `btleplug` for Bluetooth Low Energy operations.

Please check the [btleplug issues page](https://github.com/deviceplug/btleplug/issues)
for potential solutions and known problems if you encounter any issues during usage.

## Contributing

Please note that the author does not accept feature requests or new functionality additions to this project.

The only updates that will be considered are those related to underlying API changes and maintenance.

## Example

```python
import asyncio
from bleak_py import discover, find_device_by_name, BLEDevice

async def _discover():
    async for dev in await discover():
        print(dev.address())

async def main():
    device: BLEDevice = await find_device_by_name("M1(BLE)", timeout = 10)
    device.on_disconnected(lambda x: print(f"device: {x} disconnected"))
    print(device.address())
    await device.connect()
    await device.start_notify("00002bb0-0000-1000-8000-00805f9b34fb", lambda uuid, data: print(f"{uuid} received: {data}"))
    val = await device.read_gatt_char("00002a00-0000-1000-8000-00805f9b34fb")
    print(val)
    await device.write_gatt_char("00002bb0-0000-1000-8000-00805f9b34fb", [1, 2, 3, 4])
    await device.disconnect()


if __name__ == "__main__":
    asyncio.run(_discover())
    asyncio.run(main())
```

## build
* use uv
 ```shell
 cd bleak-py && uv build
 ```

* use maturin
 ```shell
 cd bleak-py && maturin build
 ```

