{"library":"pybluez","title":"PyBluez","description":"PyBluez is a Python extension module that enables access to system Bluetooth resources. It provides a socket-based interface similar to the standard Python socket module, supporting Bluetooth RFCOMM, L2CAP, and other protocols. Currently at version 0.23, it is primarily for Linux and Windows, with limited macOS support. The project is in maintenance mode with infrequent releases.","language":"python","status":"maintenance","last_verified":"Fri May 01","install":{"commands":["pip install pybluez"],"cli":null},"imports":["from bluetooth import BluetoothSocket"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import bluetooth\n\ntarget_name = \"My Device\"\ntarget_address = None\n\nnearby_devices = bluetooth.discover_devices(duration=8, lookup_names=True, flush_cache=True)\n\nfor addr, name in nearby_devices:\n    if target_name == name:\n        target_address = addr\n        break\n\nif target_address is not None:\n    print(\"Found target device with address:\", target_address)\nelse:\n    print(\"Could not find target device nearby.\")","lang":"python","description":"Discover nearby Bluetooth devices and find a device by name.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}