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.8.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.8-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: litime_ble-0.1.8.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.8.tar.gz
Algorithm Hash digest
SHA256 cad90900b4acd932ccf8f3c0c36ff724ecfdcb0e82cce1b3dcdc9a0325cdb4bf
MD5 4ca803b60e1334435590423f7bbf29e4
BLAKE2b-256 0b4f9e96de0e94f9e58ed9b844d5f4a0e2013cbdadbf0c63c5f6ccaae84e765d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: litime_ble-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.8-py3-none-any.whl
Algorithm Hash digest
SHA256 febf71395d3f0730bf129a3befb3ed36dad56488122f786adb65f7751a9dadba
MD5 a6005748e1d484713457076df5275bc7
BLAKE2b-256 0e3541cd439327c81b374e0d63af047af17b206a02d6f5a7e0ea06d0b19fa952

See more details on using hashes here.

Provenance

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