Skip to main content

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

litime_ble-0.1.6.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litime_ble-0.1.6-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

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

Hashes for litime_ble-0.1.6.tar.gz
Algorithm Hash digest
SHA256 f0afd15adafdd17e7a7d20ed21f063d16bd8bef1d3539d972ba3b30af75405ce
MD5 3bd4de0985502e15e27bb84b70dc61bd
BLAKE2b-256 ae00e54dc0cbb455ffec8cc2fe543c97087a9189f5b19662bbfec312789941b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for litime_ble-0.1.6.tar.gz:

Publisher: publish-pypi.yml on konnexio-inc/litime-ble

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for litime_ble-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7a3e9e1dd964fddd4d63d0da67dd20a0ead4a32b9ba51b525b8b15dc0722726b
MD5 68b2ebfaec8d3d837a04faaec9c45a15
BLAKE2b-256 e08d33741100d5159d05ae429e875dd7d66521153ba6221575e605fbb202d5fe

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page