$npx skillfedfor your agent

btsocket

Python library for BlueZ Bluetooth Management API

With conditionsPyPI Home AutomationReleased Jun 2024625.5K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — btsocket-0.3.0-py2.py3-none-any.whl
v0.3.0 · released 2024-06-10

Yes, if you need direct access to BlueZ's management API on Linux and are comfortable with root-level operations and early-stage code. No, if you are new to Bluetooth, need data I/O on connected devices, or require a mature, actively maintained library. The aging maintenance status suggests caution for production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires root or CAP_NET_ADMIN capability; Linux-only; works around Python socket limitation documented at https://bugs.python.org/issue36132
  • Low install friction with no runtime dependencies.
  • Maintenance is aging—last release was over a year ago and the repository shows limited activity (18 stars), though it remains unarchived.

License · maintenance · safety

MIT (permissive) — MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

last release 2024-06-10 (795 days) · last repo commit 2025-06-24 · 18 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 625,467 downloads/mo, #5,695 on PyPI

Verify before relying

pip install btsocket

from btsocket import btmgmt_sync
response = btmgmt_sync.send('SetPowered', 0, 1)
  • Whether the library works with modern Python versions (requires_python is unspecified)
  • Current state of the Python socket bug at https://bugs.python.org/issue36132 and whether it affects current releases
  • Compatibility with recent BlueZ versions and Linux kernel releases
Same gist for agents: .md · .json

What it is and what it does

btsocket is a low-level Python wrapper around the BlueZ Bluetooth Management API on Linux. It provides access to the kernel's mgmt socket interface for controlling Bluetooth adapters—powering them on/off, discovering devices, and managing connections—without the ability to read or write data on connected devices themselves. The library requires root or CAP_NET_ADMIN capability for most operations.

The package splits functionality into three layers: a socket layer (working around a Python limitation to access the user channel), a protocol layer for encoding and decoding binary mgmt commands and responses, and a programming paradigm layer offering both synchronous (blocking) and callback-driven (event-based) APIs. It is explicitly positioned as an early-stage proof of concept and not recommended as a first Bluetooth library for newcomers.

Use it for

  • Automate Bluetooth adapter power management and discovery on embedded Linux systems
  • Build home automation scripts that scan for and manage Bluetooth device presence
  • Develop educational projects exploring the BlueZ stack and low-level Bluetooth protocol
  • Monitor and control Bluetooth adapters programmatically in system administration tools
  • Create event-driven applications that react to Bluetooth device discovery or connection changes

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need direct access to BlueZ's management API on Linux and are comfortable with root-level operations and early-stage code.

No, if you are new to Bluetooth, need data I/O on connected devices, or require a mature, actively maintained library. The aging maintenance status suggests caution for production use.

Install

btsocket on PyPI

Before you install

Low install friction with no runtime dependencies. Maintenance is aging—last release was over a year ago and the repository shows limited activity (18 stars), though it remains unarchived.

Requires root or CAP_NET_ADMIN capability; Linux-only; works around Python socket limitation documented at https://bugs.python.org/issue36132

License in practice

MIT license is permissive; you may use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.

Quickstart

pip install btsocket

from btsocket import btmgmt_sync
response = btmgmt_sync.send('SetPowered', 0, 1)

Verify before relying

  • Whether the library works with modern Python versions (requires_python is unspecified)
  • Current state of the Python socket bug at https://bugs.python.org/issue36132 and whether it affects current releases
  • Compatibility with recent BlueZ versions and Linux kernel releases

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceAging 795 days since the last release
Last repo commit
First released
Downloads625,467 / month, #5,695 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaIntended Audience :: DevelopersIntended Audience :: EducationLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3 :: OnlyTopic :: EducationTopic :: Home AutomationTopic :: Software Development :: Embedded SystemsTopic :: System :: Hardware

Evidence: btsocket-0.3.0-py2.py3-none-any.whl

Tags

Capabilities
bluez bluetooth management api pythonlinux bluetooth control librarybluetooth device discovery pythonmgmt socket bluetoothbluetooth adapter controlbluez python wrapperbluetooth management commands
Topics
bluetoothlinux-onlyrequires-root
PyPI keywords
BlueZBluetoothManagementMGMTAPI

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “bluez bluetooth management api python”

  • btsocketA Python library for controlling BlueZ Bluetooth adapters on Linux…
  • bluezooBlueZoo is a mock BlueZ D-Bus API service that lets you test…
  • winrt-Windows.Devices.BluetoothProvides Python bindings to Windows Runtime Bluetooth APIs, enabling…

Give your agent the search over MCP, or paste the wish link into any chat.

More Home Automation packages

netaddr Worth it
PyPI · Software Development · released May 2024

Represents and manipulates IPv4, IPv6, MAC addresses and related network objects; supports CIDR notation, subnetting, set operations, IANA lookups, and DNS reverse generation.

BSD-3-Clausepure Python · 3.7+dormant
14.0Mdownloads / mo
homeassistant Worth it
PyPI · Home Automation · released Aug 2026

Home Assistant is an open-source home automation platform that centralizes control of smart home devices and automations on a local server or Raspberry Pi, prioritizing local control and privacy over cloud dependency.

Apache-2.0pure Python · 3.14.2+
2.1Mdownloads / mo
python-statemachine Worth it
PyPI · Libraries · released Aug 2026

Defines finite state machines and statecharts with a declarative Python API, supporting flat states, compound hierarchies, parallel regions, history states, guards, and both sync and async callbacks.

Install it if you need to model workflows, control logic, or any system with discrete states and event-driven transitions — from simple state machines to complex…

MITpure Python · 3.10+
1.3Mdownloads / mo
aiohomematic Worth it
PyPI · Python Modules · released Aug 2026

An async Python library for controlling and monitoring Homematic and HomematicIP devices through multiple backend systems (CCU3, OpenCCU, Homegear, CUxD, CCU-Jack) using XML-RPC and JSON-RPC protocols.

Install it if you need to control Homematic devices from Python; the only constraint is a requirement for Python 3.14 or later and network access to a compatible…

MITpure Python · 3.14+
621.2Kdownloads / mo
hass-web-proxy-lib With conditions
PyPI · Home Automation · released May 2026

Provides base classes and utilities for Home Assistant integrations to proxy HTTP and WebSocket traffic through Home Assistant's web server.

Install only if you are building a custom Home Assistant integration; it is not useful as a standalone package.

MITpure Python
606.7Kdownloads / mo
openccu-data With conditions
PyPI · Python Modules · released Aug 2026

Extracts and distributes Homematic CCU configuration metadata (translations, easymodes, link profiles) from OCCU, OpenCCU, or RaspberryMatic sources via local filesystem or HTTP/HTTPS.

MITpure Python · 3.14+
548.4Kdownloads / mo

See also bluezoo · pyobjc-framework-IOBluetooth · winrt-Windows.Devices.Bluetooth · bluetooth-adapters · matter-ble-proxy · pyobjc-framework-CoreBluetooth · xiaomi-ble · Adax-local · miniupnpc · pylibfdt