Skip to content

simontegelid/tekniskaverken-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tekniskaverken-api

A Python wrapper for the tekniskaverken.se API

Installation

From the command line, run

python setup.py install

Usage

import datetime

import tekniskaverken

username = 123456
password = 1234
t = tekniskaverken.TekniskaVerken(username, password)

print t.get_daily('fjarrvarme',
                    since=datetime.datetime(2013, 10, 10),
                    until=datetime.datetime(2015, 12, 15))

print t.get_yearly('vatten', since=2011, until=2015)

CLI

The CLI provides the data to stdout as CSV.

usage: tv.py [-h] [-u USERNAME] [-p PASSWORD] [--service SERVICE]
             [--period {daily,monthly,yearly}] [--since SINCE] [--until UNTIL]

TekniskaVerken CLI

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME, --username USERNAME
                        Username
  -p PASSWORD, --password PASSWORD
                        Password
  --service SERVICE     The requested service (eg. fjarrvarme, el, vatten,
                        avfall). Availability depends on the provided account.
  --period {daily,monthly,yearly}
  --since SINCE         Starting point. Format: "YYYY-MM-DD" for daily, "YYYY-
                        MM" for montly, "YYYY" for yearly.
  --until UNTIL         End point. Format: "YYYY-MM-DD" for daily, "YYYY-MM"
                        for montly, "YYYY" for yearly.

About

A Python wrapper for the tekniskaverken.se API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages