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.1.0.tar.gz
(4.5 kB
view details)
File details
Details for the file batterytender-1.1.0.tar.gz
.
File metadata
- Download URL: batterytender-1.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50c09e8f44e4167d0731ad9e35152a7e9a4c7bba7d1ed86f9ae25b2cae351f40 |
|
MD5 | 2d87b952905eb2a4c2d30caeb4c954e6 |
|
BLAKE2b-256 | d9ca8be1086bf5aa7405b94ffe59460a7610f918172094d6be21108755c0d6c0 |