Installation
pip install batterytender
Usage
Module
You can import the module as batterytender.
import batterytender
email = 'XXXXXXXXXXXXXXXXXXXX'
password = 'XXXXXXXXXXXXXXXXXXXX'
bt = batterytender.BatteryTender(email, password)
for monitor in bt.monitors:
print('Monitor id: {}'.format(monitor.device_id))
print(' Name: {}'.format(monitor.name))
print(' Date: {}'.format(monitor.date))
print(' Voltage: {}'.format(monitor.voltage))
# Historical readings
print(' History:')
for history in monitor.history:
print(' Date: {}'.format(history['date']))
print(' Voltage: {}'.format(history['voltage']))
# The latest reading is also available in the same format as
# historical reading via the `.current` property
print(' Current:')
print(' Date: {}'.format(monitor.current['date']))
print(' Voltage: {}'.format(monitor.current['voltage']))
Release files for batterytender 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| batterytender-1.2.0.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| batterytender-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.1 kB
Release files / batterytender-1.2.0.tar.gz
| Download URL | batterytender-1.2.0.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ce813d02a42c4233eb78c7411b8ab72fe675ba8e838fbf6b3b726547700d0735
|
|
BLAKE2b-256 checksum How to use checksums |
de227a00dc5630cc0a4e083859d6d44a9921dedc8751dafbe3a1f00f5fabdbd1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / batterytender-1.2.0-py3-none-any.whl
| Download URL | batterytender-1.2.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9db7867b0a2949e89b50013f5894fc6b1c3f27b89eabe18681db3e3169e125d2
|
|
BLAKE2b-256 checksum How to use checksums |
2cd76295ee1c990c7e7542fc8d3563c87c4ae3233fd54e89b00839bfa3e4eed9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|