Li Time Bluetooth battery reader via BLE (Python, Bleak)
Project description
litime-ble
Lightweight Python library and CLI to read Li Time BLE battery statistics.
Install
Install from source:
pip install .
Quick start
Example (synchronous helper):
from litime_ble import BatteryClient
with BatteryClient.sync(address="AA:BB:CC:DD:EE:FF") as client:
status = client.read_once()
print(status.json())
CLI
litime-battery read --address AA:BB:CC:DD:EE:FF --json
For protocol details and advanced usage see docs/README.md.
Developer
Run tests
PowerShell
$env:PYTHONPATH = (Resolve-Path src).Path
python -m pytest -q
macOS / Linux
PYTHONPATH=$(pwd)/src python -m pytest -q
Windows (cmd.exe)
set PYTHONPATH=%cd%\src && python -m pytest -q
Linting
ruff check src --fix
ruff check src
License
This project is licensed under the MIT License.
It follows the same license as the original codebase it was based on: litime-bluetooth-battery.
Copyright (c) 2024 Chad Johnson
Copyright (c) 2025 Konnexio Inc.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file litime_ble-0.1.6.tar.gz.
File metadata
- Download URL: litime_ble-0.1.6.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0afd15adafdd17e7a7d20ed21f063d16bd8bef1d3539d972ba3b30af75405ce
|
|
| MD5 |
3bd4de0985502e15e27bb84b70dc61bd
|
|
| BLAKE2b-256 |
ae00e54dc0cbb455ffec8cc2fe543c97087a9189f5b19662bbfec312789941b7
|
Provenance
The following attestation bundles were made for litime_ble-0.1.6.tar.gz:
Publisher:
publish-pypi.yml on konnexio-inc/litime-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litime_ble-0.1.6.tar.gz -
Subject digest:
f0afd15adafdd17e7a7d20ed21f063d16bd8bef1d3539d972ba3b30af75405ce - Sigstore transparency entry: 507014639
- Sigstore integration time:
-
Permalink:
konnexio-inc/litime-ble@6691026f268838a9b01ed7e679dad29b46d08f74 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/konnexio-inc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6691026f268838a9b01ed7e679dad29b46d08f74 -
Trigger Event:
push
-
Statement type:
File details
Details for the file litime_ble-0.1.6-py3-none-any.whl.
File metadata
- Download URL: litime_ble-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a3e9e1dd964fddd4d63d0da67dd20a0ead4a32b9ba51b525b8b15dc0722726b
|
|
| MD5 |
68b2ebfaec8d3d837a04faaec9c45a15
|
|
| BLAKE2b-256 |
e08d33741100d5159d05ae429e875dd7d66521153ba6221575e605fbb202d5fe
|
Provenance
The following attestation bundles were made for litime_ble-0.1.6-py3-none-any.whl:
Publisher:
publish-pypi.yml on konnexio-inc/litime-ble
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
litime_ble-0.1.6-py3-none-any.whl -
Subject digest:
7a3e9e1dd964fddd4d63d0da67dd20a0ead4a32b9ba51b525b8b15dc0722726b - Sigstore transparency entry: 507014670
- Sigstore integration time:
-
Permalink:
konnexio-inc/litime-ble@6691026f268838a9b01ed7e679dad29b46d08f74 -
Branch / Tag:
refs/tags/v0.1.6 - Owner: https://github.com/konnexio-inc
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@6691026f268838a9b01ed7e679dad29b46d08f74 -
Trigger Event:
push
-
Statement type: