Skip to main content

Database of all relevant numbers in the Bluetooth specification

Project description

Bluetooth numbers for Python

Continous Integration PyPI package version Python versions GitHub license

This project offers a Python package with a subset of Bluetooth Assigned Numbers, so Python projects can easily use these numbers. The goal of this project is to provide a shared resource so various Python projects that deal with Bluetooth don't have to replicate this effort.

The source of the numbers in this package is mostly Nordic Semiconductor's Bluetooth Numbers Database, an up-to-date listing of all the various Bluetooth Specification-related elements that are defined by the Bluetooth industry (Company IDs, Service UUIDs, Characteristic UUIDs and Descriptor UUIDs), that you can use instead of rolling your own. It's supplemented with some data taken from the Bluetooth Assigned Numbers document that are not tracked by the Bluetooth Numbers Database.

Installation

The package can be installed from PyPI:

pip3 install bluetooth-numbers

Usage

Get the description of a company ID:

>>> from bluetooth_numbers.companies import company
>>> company[0x0499]
'Ruuvi Innovations Ltd.'

Get the description of a service UUID:

>>> from bluetooth_numbers.services import service
>>> from uuid import UUID
>>> service[0x180F]
'Battery Service'
>>> service[UUID("6E400001-B5A3-F393-E0A9-E50E24DCCA9E")]
'Nordic UART Service'

Get the description of a characteristic UUID:

>>> from bluetooth_numbers.characteristics import characteristic
>>> from uuid import UUID
>>> characteristic[0x2A37]
'Heart Rate Measurement'
>>> characteristic[UUID("6E400002-B5A3-F393-E0A9-E50E24DCCA9E")]
'UART RX Characteristic'

Get the description of a descriptor UUID:

>>> from bluetooth_numbers.descriptors import descriptor
>>> descriptor[0x2901]
'Characteristic User Descriptor'

License

This project is provided by Koen Vervloesem as open source software with the MIT license. See the LICENSE file for more information.

See also the license for the Bluetooth Numbers Database used in this package.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bluetooth-numbers-0.2.1.tar.gz (68.1 kB view details)

Uploaded Source

Built Distribution

bluetooth_numbers-0.2.1-py3-none-any.whl (56.9 kB view details)

Uploaded Python 3

File details

Details for the file bluetooth-numbers-0.2.1.tar.gz.

File metadata

  • Download URL: bluetooth-numbers-0.2.1.tar.gz
  • Upload date:
  • Size: 68.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for bluetooth-numbers-0.2.1.tar.gz
Algorithm Hash digest
SHA256 062f0ed7b9636b95000f305ab877440f177c228ae167ef906ffe60c0ba4f389e
MD5 c8e88596064e1574e7a60eb903695dd7
BLAKE2b-256 6eafcca1e31affc4267e30e22a759d58d5958e6d465fc91f9e8007408f9bbe0a

See more details on using hashes here.

File details

Details for the file bluetooth_numbers-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bluetooth_numbers-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cac5e54237b9d0885b073b87c60824b468fc1bec30b74530335bf6ee45955495
MD5 153f62125b8facb915b8f31fcb1e034f
BLAKE2b-256 2b1444ccb0e4aa1cccb2df57a70cd5281388540edd800a71883629b8927a8799

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page