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.7.tar.gz (7.6 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.7-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file litime_ble-0.1.7.tar.gz.

File metadata

  • Download URL: litime_ble-0.1.7.tar.gz
  • Upload date:
  • Size: 7.6 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.7.tar.gz
Algorithm Hash digest
SHA256 97a827fc971286443e6272c29a131dfc702b7b1deab6fd0c24db86eb0705a51a
MD5 9f77a5e78e8c99a6070ba96b3746132a
BLAKE2b-256 3122ef8745e5a70ac39d5cbbb680dc2623aed5a4db95a7725b0889f947707e92

See more details on using hashes here.

Provenance

The following attestation bundles were made for litime_ble-0.1.7.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.7-py3-none-any.whl.

File metadata

  • Download URL: litime_ble-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 54cd725a5f0c13514d0af47b095d3387c90d491b43aa49a0e8bdae58ca6a029d
MD5 a2027458025be873ebd2214b25ad530e
BLAKE2b-256 1e61bb47bdd3896b4a061c709a574f2a2c5af02a05b140efeef2bd2fc80eef87

See more details on using hashes here.

Provenance

The following attestation bundles were made for litime_ble-0.1.7-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