Skip to main content

btlewrap

Bluetooth LowEnergy wrapper for different python backends. This gives you a nice API so that you can use different Bluetooth implementations on different platforms.

This library was initially implemented as part of the miflora library, but then refactored out, so that it can be used on other projects as well.

contribution

https://travis-ci.org/ChristianKuehnel/btlewrap.svg?branch=master https://coveralls.io/repos/github/ChristianKuehnel/btlewrap/badge.svg?branch=master

Backends

As there is unfortunately no universally working Bluetooth Low Energy library for Python, the project currently offers support for three Bluetooth implementations:

  • bluepy library (recommended library)

  • bluez tools (via a wrapper around gatttool)

  • pygatt for Bluegiga BLED112-based devices

bluepy

To use the bluepy library you have to install it on your machine, in most cases this can be done via:

pip3 install bluepy

This is the recommended backend to be used. In comparision to the gatttool wrapper, it is much faster in getting the data and also more stable.

bluez/gatttool wrapper

To use the bluez wrapper, you need to install the bluez tools on your machine. No additional python libraries are required. Some distrubutions moved the gatttool binary to a separate package. Make sure you have this binaray available on your machine.

pygatt

If you have a Blue Giga based device that is supported by pygatt, you have to install the bluepy library on your machine. In most cases this can be done via:

pip3 install pygatt

Usage

See the depending projects below on how to use the library.

Depending projects

These projects are using btlewrap:

Metadata

Release files for btlewrap 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for btlewrap 0.1.1
File Size Uploaded
btlewrap-0.1.1.tar.gz 8.8 kB Details

Release files / btlewrap-0.1.1.tar.gz

Download URL btlewrap-0.1.1.tar.gz
Size 8.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f3befbeed3a6c5abf99dc0d6bbaab570868a5175e52252d53c45bd78c85cc294
BLAKE2b-256 checksum
How to use checksums
8b08fce5925b2aea22fbd715abf6039214bdd7214b34a26c3c9d59eafb46a51e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.2.0 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1.0

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page