Metadata-Version: 2.4
Name: cidermill-apple-ble
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Communications
License-File: LICENSE
Summary: A decoder for Apple BLE proximity-pairing advertisements (AirPods, Beats, etc.). Rust core, Python bindings.
Keywords: airpods,bluetooth-le,ble,apple,parser
License-Expression: GPL-3.0-or-later
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM

# cidermill-apple-ble (Python)

Python bindings for
[cidermill-apple-ble](https://gitlab.com/timrs2998/cidermill-apple-ble), a Rust
decoder for the Bluetooth LE advertisements AirPods and Beats broadcast: battery, charging,
in-ear, lid and color.

```python
import cidermill_apple_ble

# Manufacturer data for company ID 0x004C, with the ID stripped (bleak: advertisement_data.manufacturer_data[0x004C]).
advert = cidermill_apple_ble.parse(0x004C, data)
if advert:
    print(advert["model_name"], advert["lowest_battery"], advert["any_in_ear"])
```

`parse` returns `None` for anything else; it never raises on bad input. Type stubs describe the
dict (`cidermill_apple_ble.Advertisement`). Also: `parse_manufacturer_data`, `model_name`,
`color_name`, `is_mono`, `known_models`, `known_colors`.

License: GPL-3.0-or-later, the same as the core (see LICENSE).

