Skip to content

kevincar/bless

Repository files navigation

Bless

Build, Lint, and Test PyPI version PyPI - Downloads Black

Bless is an acronym for Bluetooth Low Energy (BLE) Server Supplement.

Bless provides an OS-independent python package for creating a BLE Generic Attribute Profile (GATT) server to broadcast user-defined services and characteristics. This is particularly useful when prototyping and testing servers on different devices with the goal of ensuring that expected behavior matches across all systems.

Bless's code roughly follows a similar style to Bleak in order to ease development of client and server programs.

Installation

pip install bless

Features

Bless enables reading, writing, and notifying of BLE characteristic values. Developers can provide callback functions to manipulate data that is sent out for reading or delivered for writing prior to processing the underlying commands.

Examples

See example code for setting up a BLE server where read and write characteristic can be be probed by BLE clients (central devices)

Basic Server Example

GATT Tree Server Example