Skip to main content

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']))

Release files for batterytender 1.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for batterytender 1.2.0
File Size Uploaded
batterytender-1.2.0.tar.gz 4.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for batterytender 1.2.0
File Interpreter ABI Platform
batterytender-1.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.1 kB

Release files / batterytender-1.2.0.tar.gz

Download URL batterytender-1.2.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ce813d02a42c4233eb78c7411b8ab72fe675ba8e838fbf6b3b726547700d0735
BLAKE2b-256 checksum
How to use checksums
de227a00dc5630cc0a4e083859d6d44a9921dedc8751dafbe3a1f00f5fabdbd1
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / batterytender-1.2.0-py3-none-any.whl

Download URL batterytender-1.2.0-py3-none-any.whl
Size 5.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9db7867b0a2949e89b50013f5894fc6b1c3f27b89eabe18681db3e3169e125d2
BLAKE2b-256 checksum
How to use checksums
2cd76295ee1c990c7e7542fc8d3563c87c4ae3233fd54e89b00839bfa3e4eed9
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.2.0 This release

2 release files

1.1.0

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page