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 details)
Built Distribution
File details
Details for the file batterytender-1.2.0.tar.gz
.
File metadata
- Download URL: batterytender-1.2.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce813d02a42c4233eb78c7411b8ab72fe675ba8e838fbf6b3b726547700d0735 |
|
MD5 | c2451a329ea397675382397c55077c54 |
|
BLAKE2b-256 | de227a00dc5630cc0a4e083859d6d44a9921dedc8751dafbe3a1f00f5fabdbd1 |
File details
Details for the file batterytender-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: batterytender-1.2.0-py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9db7867b0a2949e89b50013f5894fc6b1c3f27b89eabe18681db3e3169e125d2 |
|
MD5 | 8b3fef6db6f712333b9c2296d0febcb2 |
|
BLAKE2b-256 | 2cd76295ee1c990c7e7542fc8d3563c87c4ae3233fd54e89b00839bfa3e4eed9 |