Statnett API Client
Project description
Statnett API Client
Client presents methods for reading real-time Nordic power balance data provided by the Norwegian Transmission System Operator (statnett.no).
The full list of topics accessible via Statnett REST API can be seen here.
Client supports reading of the following topics:
Installation
To install the Client, simply use pip:
$ pip install statnett_api_client
Basic Usage
from statnett_api_client import Client
# initialize parser
client = Client(fmt='pandas')
# read power flow topic and return pandas dataframe
flow = client.get('flow')
Client
You can specify the format of returned object when initializing the client. By default, it will return data as json array.
client = Client()
To get the data as pandas object, you need to specify fmt
parameter in constructor.
Specify date2index
if you want to add dates to dataframe index.
client = Client(fmt='pandas')
client = Client(fmt='pandas', date2index=True)
By default, the time is in UTC. To add a column with Central European Time (CET),
you need to specify time_cet
parameter.
client = Client(fmt='pandas', time_cet=True)
Reading Data
After you have set the client, you can read data from supported topics.
# Nordic power flow
flow = client.get('flow')
# Nordic power balance
balance = client.get('balance')
License
The Client is released under MIT License.
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
Built Distribution
Hashes for statnett-api-client-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 607077728bcc7e39002c73787879e3136f932abde0834e6a24f44d6d5ccc8099 |
|
MD5 | 386bdf9edcb70180d283e42362f74327 |
|
BLAKE2b-256 | 8c028c0b909e9f61058adefa85dd1d3ac8c9be42a2105aecf2c36731ca2b2d5d |
Hashes for statnett_api_client-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 880f4c6fe5c4baea16ec309a9a80a231478372cb89ac9ce3276a96cc3b261042 |
|
MD5 | 5b6f8a2e1cdb09a6d727bb3197f5f045 |
|
BLAKE2b-256 | d626fd3e7d43770fb5cfcf6f76becde010fb19f85b87a7da67f6e0f6e995e81e |