Python API for talking to the Deltran Battery Tender API
Project description
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']))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
batterytender-1.0.1.tar.gz
(4.7 kB
view details)
File details
Details for the file batterytender-1.0.1.tar.gz
.
File metadata
- Download URL: batterytender-1.0.1.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d06e1c02776bbf2f1d3be01f5b1f6b0ae3387f99eee461ea12e7dc78556da26 |
|
MD5 | a8ed93114720dad5659c3773e2f4e2a2 |
|
BLAKE2b-256 | 8f4b890e0b4386d8a32cd2d89645a311d1e3e7a7d66dce6fb9dd564bb860e5c7 |