# bleak.backends package

## Subpackages

- bleak.backends.bluezdbus package
  - Submodules
  - bleak.backends.bluezdbus.advertisement_monitor module
    - Advertisement Monitor
    - `AdvertisementMonitor`
      - `AdvertisementMonitor.Activate()`
      - `AdvertisementMonitor.DeviceFound()`
      - `AdvertisementMonitor.DeviceLost()`
      - `AdvertisementMonitor.Patterns()`
      - `AdvertisementMonitor.RSSIHighThreshold()`
      - `AdvertisementMonitor.RSSIHighTimeout()`
      - `AdvertisementMonitor.RSSILowThreshold()`
      - `AdvertisementMonitor.RSSILowTimeout()`
      - `AdvertisementMonitor.RSSISamplingPeriod()`
      - `AdvertisementMonitor.Release()`
      - `AdvertisementMonitor.Type()`
  - bleak.backends.bluezdbus.client module
    - `BleakClientBlueZDBus`
      - `BleakClientBlueZDBus.connect()`
      - `BleakClientBlueZDBus.disconnect()`
      - `BleakClientBlueZDBus.is_connected`
      - `BleakClientBlueZDBus.mtu_size`
      - `BleakClientBlueZDBus.name`
      - `BleakClientBlueZDBus.pair()`
      - `BleakClientBlueZDBus.read_gatt_char()`
      - `BleakClientBlueZDBus.read_gatt_descriptor()`
      - `BleakClientBlueZDBus.start_notify()`
      - `BleakClientBlueZDBus.stop_notify()`
      - `BleakClientBlueZDBus.unpair()`
      - `BleakClientBlueZDBus.write_gatt_char()`
      - `BleakClientBlueZDBus.write_gatt_descriptor()`
  - bleak.backends.bluezdbus.defs module
    - `Adapter1`
      - `Adapter1.Address`
      - `Adapter1.Alias`
      - `Adapter1.Class`
      - `Adapter1.Discoverable`
      - `Adapter1.DiscoverableTimeout`
      - `Adapter1.Discovering`
      - `Adapter1.ExperimentalFeatures`
      - `Adapter1.Modalias`
      - `Adapter1.Name`
      - `Adapter1.Pairable`
      - `Adapter1.PairableTimeout`
      - `Adapter1.Powered`
      - `Adapter1.Roles`
      - `Adapter1.UUIDs`
    - `AdvertisementMonitor1`
      - `AdvertisementMonitor1.Patterns`
      - `AdvertisementMonitor1.RSSIHighThreshold`
      - `AdvertisementMonitor1.RSSIHighTimeout`
      - `AdvertisementMonitor1.RSSILowThreshold`
      - `AdvertisementMonitor1.RSSILowTimeout`
      - `AdvertisementMonitor1.RSSISamplingPeriod`
      - `AdvertisementMonitor1.Type`
    - `AdvertisementMonitorManager1`
      - `AdvertisementMonitorManager1.SupportedFeatures`
      - `AdvertisementMonitorManager1.SupportedMonitorTypes`
    - `Battery1`
      - `Battery1.SupportedFeatures`
      - `Battery1.SupportedMonitorTypes`
    - `Device1`
      - `Device1.Adapter`
      - `Device1.Address`
      - `Device1.AddressType`
      - `Device1.AdvertisingData`
      - `Device1.AdvertisingFlags`
      - `Device1.Alias`
      - `Device1.Appearance`
      - `Device1.Blocked`
      - `Device1.Bonded`
      - `Device1.Class`
      - `Device1.Connected`
      - `Device1.Icon`
      - `Device1.LegacyPairing`
      - `Device1.ManufacturerData`
      - `Device1.Modalias`
      - `Device1.Name`
      - `Device1.Paired`
      - `Device1.RSSI`
      - `Device1.ServiceData`
      - `Device1.ServicesResolved`
      - `Device1.Trusted`
      - `Device1.TxPower`
      - `Device1.UUIDs`
      - `Device1.WakeAllowed`
    - `GattCharacteristic1`
      - `GattCharacteristic1.Flags`
      - `GattCharacteristic1.MTU`
      - `GattCharacteristic1.NotifyAcquired`
      - `GattCharacteristic1.Notifying`
      - `GattCharacteristic1.Service`
      - `GattCharacteristic1.UUID`
      - `GattCharacteristic1.Value`
      - `GattCharacteristic1.WriteAcquired`
    - `GattDescriptor1`
      - `GattDescriptor1.Characteristic`
      - `GattDescriptor1.Flags`
      - `GattDescriptor1.UUID`
      - `GattDescriptor1.Value`
    - `GattService1`
      - `GattService1.Device`
      - `GattService1.Includes`
      - `GattService1.Primary`
      - `GattService1.UUID`
  - bleak.backends.bluezdbus.manager module
    - BlueZ D-Bus manager module
    - `AdvertisementCallback`
    - `BlueZManager`
      - `BlueZManager.active_scan()`
      - `BlueZManager.add_device_watcher()`
      - `BlueZManager.async_init()`
      - `BlueZManager.get_default_adapter()`
      - `BlueZManager.get_device_address()`
      - `BlueZManager.get_device_name()`
      - `BlueZManager.get_services()`
      - `BlueZManager.is_connected()`
      - `BlueZManager.is_paired()`
      - `BlueZManager.passive_scan()`
      - `BlueZManager.remove_device_watcher()`
    - `CharacteristicValueChangedCallback`
    - `DeviceConditionCallback`
      - `DeviceConditionCallback.callback`
      - `DeviceConditionCallback.property_name`
    - `DeviceConnectedChangedCallback`
    - `DevicePropertiesChangedCallback`
    - `DeviceRemovedCallback`
    - `DeviceRemovedCallbackAndState`
      - `DeviceRemovedCallbackAndState.adapter_path`
      - `DeviceRemovedCallbackAndState.callback`
    - `DeviceWatcher`
      - `DeviceWatcher.device_path`
      - `DeviceWatcher.on_characteristic_value_changed`
      - `DeviceWatcher.on_connected_changed`
    - `get_global_bluez_manager()`
    - `get_max_write_without_response_size()`
  - bleak.backends.bluezdbus.scanner module
    - `BleakScannerBlueZDBus`
      - `BleakScannerBlueZDBus.set_scanning_filter()`
      - `BleakScannerBlueZDBus.start()`
      - `BleakScannerBlueZDBus.stop()`
  - bleak.backends.bluezdbus.signals module
    - `InvalidMessageTypeError`
    - `MatchRules`
      - `MatchRules.parse()`
    - `add_match()`
    - `assert_bus_name_valid()`
    - `is_message_type_valid()`
    - `remove_match()`
  - bleak.backends.bluezdbus.utils module
    - `assert_reply()`
    - `device_path_from_characteristic_path()`
    - `extract_service_handle_from_path()`
    - `get_dbus_authenticator()`
  - bleak.backends.bluezdbus.version module
    - `BlueZFeatures`
      - `BlueZFeatures.check_bluez_version()`
      - `BlueZFeatures.checked_bluez_version`
      - `BlueZFeatures.supported_version`
  - Module contents
- bleak.backends.corebluetooth package
  - Submodules
  - bleak.backends.corebluetooth.CentralManagerDelegate module
  - bleak.backends.corebluetooth.PeripheralDelegate module
  - bleak.backends.corebluetooth.client module
    - `BleakClientCoreBluetooth`
      - `BleakClientCoreBluetooth.connect()`
      - `BleakClientCoreBluetooth.disconnect()`
      - `BleakClientCoreBluetooth.get_rssi()`
      - `BleakClientCoreBluetooth.is_connected`
      - `BleakClientCoreBluetooth.mtu_size`
      - `BleakClientCoreBluetooth.name`
      - `BleakClientCoreBluetooth.pair()`
      - `BleakClientCoreBluetooth.read_gatt_char()`
      - `BleakClientCoreBluetooth.read_gatt_descriptor()`
      - `BleakClientCoreBluetooth.start_notify()`
      - `BleakClientCoreBluetooth.stop_notify()`
      - `BleakClientCoreBluetooth.unpair()`
      - `BleakClientCoreBluetooth.write_gatt_char()`
      - `BleakClientCoreBluetooth.write_gatt_descriptor()`
  - bleak.backends.corebluetooth.scanner module
    - `BleakScannerCoreBluetooth`
      - `BleakScannerCoreBluetooth.start()`
      - `BleakScannerCoreBluetooth.stop()`
  - bleak.backends.corebluetooth.utils module
    - `cb_uuid_to_str()`
    - `to_optional_int()`
    - `to_optional_str()`
  - Module contents
- bleak.backends.p4android package
  - Submodules
  - bleak.backends.p4android.client module
    - `BleakClientP4Android`
      - `BleakClientP4Android.connect()`
      - `BleakClientP4Android.disconnect()`
      - `BleakClientP4Android.is_connected`
      - `BleakClientP4Android.mtu_size`
      - `BleakClientP4Android.pair()`
      - `BleakClientP4Android.read_gatt_char()`
      - `BleakClientP4Android.read_gatt_descriptor()`
      - `BleakClientP4Android.start_notify()`
      - `BleakClientP4Android.stop_notify()`
      - `BleakClientP4Android.unpair()`
      - `BleakClientP4Android.write_gatt_char()`
      - `BleakClientP4Android.write_gatt_descriptor()`
  - bleak.backends.p4android.defs module
    - `ScanFailed`
  - bleak.backends.p4android.scanner module
    - `BleakScannerP4Android`
      - `BleakScannerP4Android.start()`
      - `BleakScannerP4Android.stop()`
  - bleak.backends.p4android.utils module
    - `AsyncJavaCallbacks`
      - `AsyncJavaCallbacks.perform_and_wait()`
  - Module contents
- bleak.backends.winrt package
  - Submodules
  - bleak.backends.winrt.client module
    - `BleakClientWinRT`
      - `BleakClientWinRT.connect()`
      - `BleakClientWinRT.disconnect()`
      - `BleakClientWinRT.is_connected`
      - `BleakClientWinRT.mtu_size`
      - `BleakClientWinRT.name`
      - `BleakClientWinRT.pair()`
      - `BleakClientWinRT.read_gatt_char()`
      - `BleakClientWinRT.read_gatt_descriptor()`
      - `BleakClientWinRT.start_notify()`
      - `BleakClientWinRT.stop_notify()`
      - `BleakClientWinRT.unpair()`
      - `BleakClientWinRT.write_gatt_char()`
      - `BleakClientWinRT.write_gatt_descriptor()`
    - `FutureLike`
      - `FutureLike.add_done_callback()`
      - `FutureLike.cancel()`
      - `FutureLike.cancelled()`
      - `FutureLike.done()`
      - `FutureLike.exception()`
      - `FutureLike.get_loop()`
      - `FutureLike.remove_done_callback()`
      - `FutureLike.result()`
  - bleak.backends.winrt.scanner module
    - `BleakScannerWinRT`
      - `BleakScannerWinRT.start()`
      - `BleakScannerWinRT.stop()`
    - `RawAdvData`
      - `RawAdvData.adv`
      - `RawAdvData.scan`
  - bleak.backends.winrt.util module
    - `allow_sta()`
    - `assert_mta()`
    - `check_hresult()`
    - `uninitialize_sta()`
  - Module contents

## Submodules

## bleak.backends.characteristic module

Interface class for the Bleak representation of a GATT Characteristic

class bleak.backends.characteristic.BleakGATTCharacteristic(obj: Any, handle: int, uuid: str, properties: list[CharacteristicPropertyName], max_write_without_response_size: Callable[[], int], service: BleakGATTService)

  Bases: `object`

  The Bleak representation of a GATT Characteristic

  add_descriptor(descriptor: BleakGATTDescriptor) → None

    Add a `BleakGATTDescriptor` to the characteristic.

    Should not be used by end user, but rather by bleak itself.

  property description: str

    Description for this characteristic

  property descriptors: list[BleakGATTDescriptor]

    List of descriptors for this service

  get_descriptor(specifier: int | str | UUID) → BleakGATTDescriptor | None

    Get a descriptor by handle (int) or UUID (str or uuid.UUID)

  property handle: int

    The handle for this characteristic

  property max_write_without_response_size: int

    Gets the maximum size in bytes that can be used for the data argument of `BleakClient.write_gatt_char()` when `response=False`.

    In rare cases, a device may take a long time to update this value, so reading this property may return the default value of `20` and reading it again after a some time may return the expected higher value.

    If you really need to wait for a higher value, you can do something like this:

        async with asyncio.timeout(10):
            while char.max_write_without_response_size == 20:
                await asyncio.sleep(0.5)

    Warning

    Linux quirk: For BlueZ versions < 5.62, this property will always return `20`.

    Added in version 0.16.

  property properties: list[Literal['broadcast', 'read', 'write-without-response', 'write', 'notify', 'indicate', 'authenticated-signed-writes', 'extended-properties', 'reliable-write', 'writable-auxiliaries', 'encrypt-read', 'encrypt-write', 'encrypt-authenticated-read', 'encrypt-authenticated-write', 'authorize']]

    Properties of this characteristic

  property service_handle: int

    The integer handle of the Service containing this characteristic

  property service_uuid: str

    The UUID of the Service containing this characteristic

  property uuid: str

    The UUID for this characteristic

class bleak.backends.characteristic.GattCharacteristicsFlags(*values)

  Bases: `Enum`

  authenticated_signed_writes = 64
  broadcast = 1
  extended_properties = 128
  indicate = 32
  notify = 16
  read = 2
  reliable_write = 256
  writable_auxiliaries = 512
  write = 8
  write_without_response = 4

## bleak.backends.client module

Base class for backend clients.

class bleak.backends.client.BaseBleakClient(address_or_ble_device: BLEDevice | str, **kwargs: Any)

  Bases: `ABC`

  The Client Interface for Bleak Backend implementations to implement.

  The documentation of this interface should thus be safe to use as a reference for your implementation.

  Parameters:

    address_or_ble_device (BLEDevice or str) – The Bluetooth address of the BLE peripheral to connect to or the BLEDevice object representing it.

  Keyword Arguments:

    - timeout (float) – Timeout for required `discover` call.

    - disconnected_callback (callable) – Callback that will be scheduled in the event loop when the client is disconnected. The callable must take one argument, which will be this client object.

  abstractmethod async connect(pair: bool, **kwargs: Any) → None

    Connect to the specified GATT server.

    Parameters:

      - pair (bool) – If the client should attempt to pair with the

      - paired. (peripheral before connecting if it is not already)

      - appropriate (Backends that can't implement this should make an)

      - parameter. (log message and ignore the)

  abstractmethod async disconnect() → None

    Disconnect from the specified GATT server.

  abstract property is_connected: bool

    Check connection status between this client and the server.

    Returns:

      Boolean representing connection status.

  abstract property mtu_size: int

    Gets the negotiated MTU.

  property name: str

    See `bleak.BleakClient.name()`.

  abstractmethod async pair(*args: Any, **kwargs: Any) → None

    Pair with the peripheral.

  abstractmethod async read_gatt_char(characteristic: BleakGATTCharacteristic, **kwargs: Any) → bytearray

    Perform read operation on the specified GATT characteristic.

    Parameters:

      characteristic (BleakGATTCharacteristic) – The characteristic to read from.

    Returns:

      (bytearray) The read data.

  abstractmethod async read_gatt_descriptor(descriptor: BleakGATTDescriptor, **kwargs: Any) → bytearray

    Perform read operation on the specified GATT descriptor.

    Parameters:

      descriptor – The descriptor to read from.

    Returns:

      The read data.

  set_disconnected_callback(callback: Callable[[], None] | None, **kwargs: Any) → None

    Set the disconnect callback. The callback will only be called on unsolicited disconnect event.

    Set the callback to `None` to remove any existing callback.

    Parameters:

      callback – callback to be called on disconnection.

  abstractmethod async start_notify(characteristic: BleakGATTCharacteristic, callback: Callable[[bytearray], None], **kwargs: Any) → None

    Activate notifications/indications on a characteristic.

    Implementers should call the OS function to enable notifications or indications on the characteristic.

    To keep things the same cross-platform, notifications should be preferred over indications if possible when a characteristic supports both.

  abstractmethod async stop_notify(characteristic: BleakGATTCharacteristic) → None

    Deactivate notification/indication on a specified characteristic.

    Parameters:

      characteristic (BleakGATTCharacteristic) – The characteristic to deactivate notification/indication on.

  abstractmethod async unpair() → None

    Unpair with the peripheral.

  abstractmethod async write_gatt_char(characteristic: BleakGATTCharacteristic, data: SizedBuffer, response: bool) → None

    Perform a write operation on the specified GATT characteristic.

    Parameters:

      - characteristic – The characteristic to write to.

      - data – The data to send.

      - response – If write-with-response operation should be done.

  abstractmethod async write_gatt_descriptor(descriptor: BleakGATTDescriptor, data: SizedBuffer) → None

    Perform a write operation on the specified GATT descriptor.

    Parameters:

      - descriptor – The descriptor to read from.

      - data – The data to send (any bytes-like object).

bleak.backends.client.get_platform_client_backend_type() → tuple[type[BaseBleakClient], BleakBackend]

  Gets the platform-specific `BaseBleakClient` type.

## bleak.backends.descriptor module

Interface class for the Bleak representation of a GATT Descriptor

class bleak.backends.descriptor.BleakGATTDescriptor(obj: Any, handle: int, uuid: str, characteristic: BleakGATTCharacteristic)

  Bases: `object`

  The Bleak representation of a GATT Descriptor

  property characteristic_handle: int

    handle for the characteristic that this descriptor belongs to

  property characteristic_uuid: str

    UUID for the characteristic that this descriptor belongs to

  property description: str

    A text description of what this descriptor represents

  property handle: int

    Integer handle for this descriptor

  property uuid: str

    UUID for this descriptor

## bleak.backends.device module

Wrapper class for Bluetooth LE servers returned from calling `bleak.discover()`.

class bleak.backends.device.BLEDevice(address: str, name: str | None, details: Any, **kwargs: Any)

  Bases: `object`

  A simple wrapper class representing a BLE server detected during scanning.

  address

    The Bluetooth address of the device on this machine (UUID on macOS).

  details

    The OS native details required for connecting to the device.

  name

    The operating system name of the device (not necessarily the local name from the advertising data), suitable for display to the user.

## bleak.backends.scanner module

class bleak.backends.scanner.AdvertisementData(local_name: str | None, manufacturer_data: dict[int, bytes], service_data: dict[str, bytes], service_uuids: list[str], tx_power: int | None, rssi: int, platform_data: tuple[Any, ...])

  Bases: `NamedTuple`

  Wrapper around the advertisement data that each platform returns upon discovery

  local_name: str | None

    The local name of the device or `None` if not included in advertising data.

  manufacturer_data: dict[int, bytes]

    Dictionary of manufacturer data in bytes from the received advertisement data or empty dict if not present.

    The keys are Bluetooth SIG assigned Company Identifiers and the values are bytes.

    https://www.bluetooth.com/specifications/assigned-numbers/company-identifiers/

  platform_data: tuple[Any, ...]

    Tuple of platform specific data.

    This is not a stable API. The actual values may change between releases.

  rssi: int

    The Radio Receive Signal Strength (RSSI) in dBm.

    Added in version 0.19.

  service_data: dict[str, bytes]

    Dictionary of service data from the received advertisement data or empty dict if not present.

  service_uuids: list[str]

    List of service UUIDs from the received advertisement data or empty list if not present.

  tx_power: int | None

    TX Power Level of the remote device from the received advertising data or `None` if not present.

    Added in version 0.17.

bleak.backends.scanner.AdvertisementDataCallback

  Type alias for callback called when advertisement data is received.

  alias of `Callable`[[`BLEDevice`, `AdvertisementData`], `Coroutine`[`Any`, `Any`, `None`] | `None`]

bleak.backends.scanner.AdvertisementDataFilter

  Type alias for an advertisement data filter function.

  Implementations should return `True` for matches, otherwise `False`.

  alias of `Callable`[[`BLEDevice`, `AdvertisementData`], `bool`]

class bleak.backends.scanner.BaseBleakScanner(detection_callback: Callable[[BLEDevice, AdvertisementData], Coroutine[Any, Any, None] | None] | None, service_uuids: list[str] | None)

  Bases: `ABC`

  Interface for Bleak Bluetooth LE Scanners

  Parameters:

    - detection_callback – Optional function that will be called each time a device is discovered or advertising data has changed.

    - service_uuids – Optional list of service UUIDs to filter on. Only advertisements containing this advertising data will be received.

  call_detection_callbacks(device: BLEDevice, advertisement_data: AdvertisementData) → None

    Calls all registered detection callbacks.

    Backend implementations should call this method when an advertisement event is received from the OS.

  create_or_update_device(key: str, address: str, name: str | None, details: Any, adv: AdvertisementData) → BLEDevice

    Creates or updates a device in `seen_devices`.

    Parameters:

      - key – A backend-specific identifier for the device.

      - address – The Bluetooth address of the device (UUID on macOS).

      - name – The OS display name for the device.

      - details – The platform-specific handle for the device.

      - adv – The most recent advertisement data received.

    Returns:

      The updated device.

  is_allowed_uuid(service_uuids: list[str] | None) → bool

    Check if the advertisement data contains any of the service UUIDs matching the filter. If no filter is set, this will always return `True`.

    Parameters:

      service_uuids – The service UUIDs from the advertisement data.

    Returns:

      `True` if the advertisement data should be allowed or `False`

        if the advertisement data should be filtered out.

  register_detection_callback(callback: Callable[[BLEDevice, AdvertisementData], Coroutine[Any, Any, None] | None] | None) → Callable[[], None]

    Register a callback that is called when an advertisement event from the OS is received.

    The `callback` is a function or coroutine that takes two arguments: `BLEDevice` and `AdvertisementData`.

    Parameters:

      callback – A function, coroutine or `None`.

    Returns:

      A method that can be called to unregister the callback.

  seen_devices: dict[str, tuple[BLEDevice, AdvertisementData]]

    Map of device identifier to BLEDevice and most recent advertisement data.

    The key is a backend-specific identifier for the device.

    This map must be cleared when scanning starts.

  abstractmethod async start() → None

    Start scanning for devices

  abstractmethod async stop() → None

    Stop scanning for devices

bleak.backends.scanner.get_platform_scanner_backend_type() → tuple[type[BaseBleakScanner], BleakBackend]

  Gets the platform-specific `BaseBleakScanner` type.

## bleak.backends.service module

Gatt Service Collection class and interface class for the Bleak representation of a GATT Service.

class bleak.backends.service.BleakGATTService(obj: Any, handle: int, uuid: str)

  Bases: `object`

  The Bleak representation of a GATT Service.

  add_characteristic(characteristic: BleakGATTCharacteristic) → None

    Add a `BleakGATTCharacteristic` to the service.

    Should not be used by end user, but rather by bleak itself.

  property characteristics: list[BleakGATTCharacteristic]

    List of characteristics for this service

  property description: str

    String description for this service

  get_characteristic(uuid: str | UUID) → BleakGATTCharacteristic | None

    Get a characteristic by UUID.

    Parameters:

      uuid – The UUID to match.

    Returns:

      The first characteristic matching `uuid` or `None` if no matching characteristic was found.

  property handle: int

    The handle of this service

  property uuid: str

    The UUID to this service

class bleak.backends.service.BleakGATTServiceCollection

  Bases: `object`

  Simple data container for storing the peripheral’s service complement.

  add_characteristic(characteristic: BleakGATTCharacteristic) → None

    Add a `BleakGATTCharacteristic` to the service collection.

    Should not be used by end user, but rather by bleak itself.

  add_descriptor(descriptor: BleakGATTDescriptor) → None

    Add a `BleakGATTDescriptor` to the service collection.

    Should not be used by end user, but rather by bleak itself.

  add_service(service: BleakGATTService) → None

    Add a `BleakGATTService` to the service collection.

    Should not be used by end user, but rather by bleak itself.

  property characteristics: dict[int, BleakGATTCharacteristic]

    Returns dictionary of handles mapping to BleakGATTCharacteristic

  property descriptors: dict[int, BleakGATTDescriptor]

    Returns a dictionary of integer handles mapping to BleakGATTDescriptor

  get_characteristic(specifier: int | str | UUID) → BleakGATTCharacteristic | None

    Get a characteristic by handle (int) or UUID (str or uuid.UUID)

  get_descriptor(handle: int) → BleakGATTDescriptor | None

    Get a descriptor by integer handle

  get_service(specifier: int | str | UUID) → BleakGATTService | None

    Get a service by handle (int) or UUID (str or uuid.UUID)

  property services: dict[int, BleakGATTService]

    Returns dictionary of handles mapping to BleakGATTService

## Module contents

Communicating with Bluetooth hardware requires calling OS-specific APIs. These are abstracted as “backends” in Bleak.

The backend will be automatically selected based on the operating system Bleak is running on. In some cases, this may also depend on a specific runtime, like Pythonista on iOS.

class bleak.backends.BleakBackend(*values)

  Bases: `str`, `Enum`

  Identifiers for available built-in Bleak backends.

  Added in version 2.0.

  BLUEZ_DBUS = 'bluez_dbus'

    BlueZ D-Bus backend for Linux.

  CORE_BLUETOOTH = 'core_bluetooth'

    CoreBluetooth backend for macOS.

  P4ANDROID = 'p4android'

    Python for Android backend.

  PYTHONISTA_CB = 'pythonista_cb'

    Pythonista CoreBluetooth backend for iOS and macOS.

  WIN_RT = 'win_rt'

    Windows Runtime backend for Windows.

bleak.backends.get_default_backend() → BleakBackend

  Returns the preferred backend for the current platform/environment.

  Added in version 2.0.