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.2.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for batterytender-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9db7867b0a2949e89b50013f5894fc6b1c3f27b89eabe18681db3e3169e125d2 |
|
MD5 | 8b3fef6db6f712333b9c2296d0febcb2 |
|
BLAKE2b-256 | 2cd76295ee1c990c7e7542fc8d3563c87c4ae3233fd54e89b00839bfa3e4eed9 |