Skip to main content

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


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)

Uploaded Source

Built Distribution

batterytender-1.2.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

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

Hashes for batterytender-1.2.0.tar.gz
Algorithm Hash digest
SHA256 ce813d02a42c4233eb78c7411b8ab72fe675ba8e838fbf6b3b726547700d0735
MD5 c2451a329ea397675382397c55077c54
BLAKE2b-256 de227a00dc5630cc0a4e083859d6d44a9921dedc8751dafbe3a1f00f5fabdbd1

See more details on using hashes here.

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

Hashes for batterytender-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9db7867b0a2949e89b50013f5894fc6b1c3f27b89eabe18681db3e3169e125d2
MD5 8b3fef6db6f712333b9c2296d0febcb2
BLAKE2b-256 2cd76295ee1c990c7e7542fc8d3563c87c4ae3233fd54e89b00839bfa3e4eed9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page