Python package with a wide set of numbers related to Bluetooth
Project description
bluetooth-numbers
Python package with a wide set of numbers related to Bluetooth
This project offers a Python package with a wide set of numbers related to Bluetooth, 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 by rolling their own database and keeping it updated.
The following sources are used:
Nordic Semiconductor’s Bluetooth Numbers Database for Company IDs, Service UUIDs, Characteristic UUIDs and Descriptor UUIDs
Bluetooth Assigned Numbers for SDO Service UUIDs and Member Service UUIDs
The IEEE database of OUIs for prefixes of Bluetooth addresses
Installation
You can install bluetooth-numbers as a package from PyPI with pip:
pip install bluetooth-numbers
Usage
Get the description of a company ID:
>>> from bluetooth_numbers import company
>>> company[0x0499]
'Ruuvi Innovations Ltd.'
Get the description of a service UUID:
>>> from bluetooth_numbers 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 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 import descriptor
>>> descriptor[0x2901]
'Characteristic User Descriptor'
Get the description of an OUI:
>>> from bluetooth_numbers import oui
>>> oui["58:2D:34"]
'Qingping Electronics (Suzhou) Co., Ltd'
See the module reference for complete documentation.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file bluetooth-numbers-1.1.0.tar.gz
.
File metadata
- Download URL: bluetooth-numbers-1.1.0.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f5cae94a2945c9b9027cbb8d4501fbc10c3f21c4fbe7d0679458eaa0d8e6521 |
|
MD5 | 84c1f67ca860154f036227426608d07d |
|
BLAKE2b-256 | 62e274c7e9f1c49a1714854e2469c08fa40ac1a7a8c5c97185bbf29d109063b2 |
File details
Details for the file bluetooth_numbers-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: bluetooth_numbers-1.1.0-py3-none-any.whl
- Upload date:
- Size: 467.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b9332d7b6cad26dd194d6783ebc912e1d416ed845bfb127b3f3086cff54d6a8a |
|
MD5 | c214c03b44d17326ec8ccec1c0c89ab8 |
|
BLAKE2b-256 | 53faf2b955bfc0a48a96eace0f8325daa636c2ed68fbd3ccdef77e0ac01221c2 |