Skip to main content

A python module to post meter readings to Mindergas

Project description

pymindergas

A module to post meter readings to MinderGas.nl.

Installation

$ pip3 install pymindergas

Usage

In order to be able to post readings, you first need to obtain an API token.

The postReading() method requires an authentication token (String) and the meter reading (Float). The reading date can be any valid date (String), but is optional.

Parameter Required Description
token yes String
reading yes Float
date no Any date string that can be parsed. If not passed, uses today.

Code sample:

from datetime import date
from datetime import timedelta
from pymindergas import Mindergas

token = "supersecretstring"
reading = 1234.567
yesterday = date.today() - timedelta(days = 1)

# Post reading as yesterday's
success = Mindergas().postReading(token, reading, yesterday.strftime('%y-%m-%d'))
print(success)

# Post reading as today's
success = Mindergas().postReading(token, reading)
print(success)

Disclaimer

This is an open source project and does not have any affiliation with MinderGas.nl.

All product names, trademarks and registered trademarks in this repository are property of their respective owners. All images in this repository are used by the project for identification purposes only.

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

pymindergas-0.1.12.tar.gz (14.8 kB view hashes)

Uploaded Source

Built Distribution

pymindergas-0.1.12-py3-none-any.whl (15.1 kB view hashes)

Uploaded Python 3

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