{"library":"simplepyble","title":"SimplePyBLE","description":"SimplePyBLE provides Python bindings for SimpleBLE, a fully cross-platform Bluetooth Low Energy (BLE) library written in C++. It is designed for simplicity and ease of use, offering a consistent API across Windows, macOS, and Linux, with some support for iOS and Android. The library is currently at version 0.12.1 and maintains an active release cadence, with frequent updates addressing features, stability, and bug fixes.","language":"python","status":"active","last_verified":"Mon May 18","install":{"commands":["pip install simplepyble"],"cli":null},"imports":["from simplepyble import Adapter","from simplepyble.aio import Adapter"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import asyncio\nfrom simplepyble.aio import Adapter\n\nasync def main():\n    adapters = Adapter.get_adapters()\n    if not adapters:\n        print(\"No adapters found. Ensure Bluetooth is on and permissions are granted.\")\n        return\n\n    # Use the first adapter found\n    adapter = adapters[0]\n    print(f\"Selected adapter: {adapter.identifier()} [{adapter.address()}]\")\n\n    # Use the adapter within an async context manager\n    async with adapter:\n        print(\"Scanning for 5 seconds...\")\n        await adapter.scan_for(5000) # Scan for 5000 milliseconds\n\n        peripherals = adapter.scan_get_results()\n        if not peripherals:\n            print(\"No peripherals found.\")\n            return\n\n        print(\"Found peripherals:\")\n        for i, peripheral in enumerate(peripherals):\n            print(f\"  [{i}] {peripheral.identifier()} [{peripheral.address()}] - Connectable: {peripheral.is_connectable()}\")\n\n        # Example: Connect to the first connectable peripheral found\n        connectable_peripherals = [p for p in peripherals if p.is_connectable()]\n        if connectable_peripherals:\n            selected_peripheral = connectable_peripherals[0]\n            print(f\"Attempting to connect to: {selected_peripheral.identifier()}\")\n            await selected_peripheral.connect()\n            print(f\"Successfully connected to {selected_peripheral.identifier()}\")\n\n            # Discover services and characteristics (example)\n            services = selected_peripheral.services()\n            for service in services:\n                print(f\"  Service: {service.uuid()}\")\n                for characteristic in service.characteristics():\n                    print(f\"    Characteristic: {characteristic.uuid()} (Can Read: {characteristic.can_read()})\")\n            \n            await selected_peripheral.disconnect()\n            print(f\"Disconnected from {selected_peripheral.identifier()}\")\n        else:\n            print(\"No connectable peripherals found to demonstrate connection.\")\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n","lang":"python","description":"This asynchronous quickstart demonstrates how to initialize an adapter, scan for Bluetooth Low Energy (BLE) peripherals, and connect to a discovered device. It uses the `simplepyble.aio` module, which offers an `asyncio`-compatible API with automatic callback cleanup and context manager support for robust asynchronous operations.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-18","installed_version":"0.14.0","pypi_latest":"0.14.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":50,"avg_install_s":2.2,"avg_import_s":0,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"simplepyble","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"simplepyble","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.9,"import_time_s":0,"mem_mb":0.1,"disk_size":"26M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"simplepyble","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"simplepyble","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.01,"mem_mb":0.1,"disk_size":"28M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"simplepyble","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"simplepyble","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.6,"import_time_s":0,"mem_mb":0.1,"disk_size":"20M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"simplepyble","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"simplepyble","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.7,"import_time_s":0,"mem_mb":0.1,"disk_size":"19M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"simplepyble","exit_code":1,"wheel_type":null,"failure_reason":"build_error","import_side_effects":null,"install_time_s":null,"import_time_s":null,"mem_mb":null,"disk_size":null},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"simplepyble","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.8,"import_time_s":0,"mem_mb":0.1,"disk_size":"25M"}]}}