Registry / http-networking / winrt-windows-devices-bluetooth-advertisement

winrt-windows-devices-bluetooth-advertisement

JSON →
library3.2.1pypypiunverified

Python projection of the Windows Runtime (WinRT) Bluetooth Advertisement APIs, part of the pywinrt project. Provides access to Bluetooth LE advertisement watcher, publisher, and related types. Current version 3.2.1, requires Python >=3.9, release cadence irregular (major/minor patches monthly to quarterly).

pip install winrt-windows-devices-bluetooth-advertisement
INSTALL
IMPORT
SIG · WINRT-WINDOWS-DEVI
W
winrt-windows-devices-bluetooth-advertisement
http-networkingpythonv3.2.1
Install
Import
Disk
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
build_error
glibc
py 3.103.95 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

BluetoothLEAdvertisementWatcher
from winrt.windows.devices.bluetooth.advertisement import BluetoothLEAdvertisementWatcher
BluetoothLEAdvertisementPublisher
from winrt.windows.devices.bluetooth.advertisement import BluetoothLEAdvertisementPublisher
BluetoothLEAdvertisement
from winrt.windows.devices.bluetooth.advertisement import BluetoothLEAdvertisement
BluetoothLEAdvertisementDataTypes
from winrt.windows.devices.bluetooth.advertisement import BluetoothLEAdvertisementDataTypes

Creates and runs a Bluetooth LE advertisement watcher for 5 seconds.

import asyncio from winrt.windows.devices.bluetooth.advertisement import BluetoothLEAdvertisementWatcher async def watch(): watcher = BluetoothLEAdvertisementWatcher() watcher.received += lambda s, e: print(f"Received: {e.bluetooth_address}") watcher.start() await asyncio.sleep(5) watcher.stop() asyncio.run(watch())
Debug
Known issues
breakingBreaking change in v3.0.0: namespace paths changed to match C# casing (e.g., `winrt.windows.devices.bluetooth.advertisement`). Old paths like `winrt.windows.devices.bluetooth.advertisement` (lowercase) may still exist in v2.x but are removed in v3.x.
fix
Use exact casing: `from winrt.windows.devices.bluetooth.advertisement import ...`.
affects: >=3.0.0
breakingBreaking change in v3.0.0: Event registration returns `EventRegistrationToken` but no longer accepts lambdas with `+=` directly? Check documentation; `+=` pattern is supported.
fix
Use `watcher.received += handler` with a callable that accepts (sender, args).
affects: >=3.0.0
gotchaAsync operations must be awaited or called with `.get()` / `.wait()` (v3.2.0+). In v2.x, some async methods had to be called differently (e.g., `.start()` returns IAsyncAction). Use `await` or `asyncio.run()`.
fix
Use `await watcher.start()` if it returns an async action, or `watcher.start()` if it is synchronous. Check return type.
affects: >=3.0.0
gotchaBluetooth LE permissions must be enabled in Windows settings. Missing permission can cause `AccessDeniedException` or silent failure.
fix
Enable Bluetooth and grant permission in Windows Settings > Privacy & security > Bluetooth.
affects: all
Upgrade
Version history
3.2.1latest on PyPI · released Jun 6, 2025
Audit
Dependencies
winrt-runtimerequiredCore runtime module required by all WinRT projections
winrt-windows-foundationrequiredBase types like IAsyncOperation, EventRegistrationToken
winrt-windows-devices-bluetoothrequiredBluetooth device addressing and enumeration
Agent activity
36 hits · last 30 days
node
34
OpenAI (training)
1
Resources
winrt-windows-devices-bluetooth-advertisement — pip install winrt-windows-devices-bluetooth-advertisement · libregistry