Skip to main content

Python client for Dataverse

Project description

Dataverse Python Client

Python client for Dataverse platform.

Pre-requisites

  1. Python version 3.10+
  2. Environment variable DATAVERSE_BASE_URL
  3. Environment variable DATAVERSE_AUTH_TOKEN
  4. or both can be passed explicitly to create_client function as arguments.

You can generate authentication token in Terraverse SmartCube portal. Intial values for both DATAVERSE_BASE_URL and DATAVERSE_AUTH_TOKEN will be issued once your SmartCube account will become active and if your subscription plan includes Dataverse.

Quickstart

from dtvr.client import create_client

client = create_client()
with client.last_exchange_rates() as resp:
    reader = resp.as_csv_rows()
    for row in reader:
        print(row)  # use the data here
from dtvr.client import create_client, CEPS_AREA_DOMAIN
from dtvr.timeutil import today_start_end

client = create_client()
start, end = today_start_end()
with client.procured_balancing_capacity(CEPS_AREA_DOMAIN, start, end) as resp:
    df = resp.as_pandas()
    df.info(memory_usage=True)
    # use the dataframe here

DateLike arguments

Several methods of the client accepts arguments representing start and end of some date range for which you need to download the data. To pass something as date-like argument you can either:

  • use datetime
  • use date
  • use string with the format yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss

Features

  • Easy to use client library that will help you to consume Datavere endpoints quickly.
  • Response containing data can be converted to either:
    • iterator representing CSV rows (list of string and numeric values)
    • pandas DataFrame
  • Several convenience functions for manipulating date & time in module dtvr.timeutil.

Available Dataverse Endpoints

method short description
last_exchange_rates Get last known exchange rates. Data source is CNB and rates are calculated to CZK.
balancing_energy_bid Get ENTSOE balancing energy bid data for the specified connecting domain and time interval.
procured_balancing_capacity_daily Get ENTSOE procured balancing capacity data from daily auction for the specified area domain and time interval.
procured_balancing_capacity_yearly Get ENTSOE procured balancing capacity data from yearly auction for the specified area domain and year.
exchanged_volume Get TransnetBW exchanged volumes data for the day.
cross_border_marginal_price Get TransnetBW cross border marginal prices data for the day.
ceps_current_system_imbalance_actual Get last ~15 minutes of CEPS current system imbalance data. Minute averages.
ceps_current_system_imbalance_daily* Get CEPS current system imbalance data for specific day. Minute averages.
ceps_svr_activations_actual Get last ~15 minutes of CEPS svr activations data. Minute averages.
ceps_svr_activations_daily Get CEPS svr activations data for specific day. Minute averages.
ceps_svr_export_import_actual Get last ~15 minutes of CEPS svr export import data. Minute averages.
ceps_svr_export_import_daily Get CEPS svr export import data for specific day. Minute averages.
ceps_svr_maximum_dt_price Get CEPS svr maximum dt price for specific day.
ceps_cross_border_power_flows_actual Get last ~15 minutes of CEPS cross border power flow data. Minute averages.
ceps_cross_border_power_flows_daily Get CEPS cross border power flow data for specific day. Minute averages.
ceps_emergency_exchange Get CEPS emergency exhange data for specific day. Quarter-hour averages.
ceps_generation_plan Get CEPS generation plan data for specific day. Hour averages.
ceps_generation Get CEPS generation data for specific day. Quarter hour averages.
ceps_generation_renewable_source_actual Get last ~15 minutes of CEPS generation renewable source data. Minute averages.
ceps_generation_renewable_source_daily Get CEPS generation renewable source data for specific day. Minute averages.
ceps_imbalance_price_prediction Get CEPS imbalance price prediction data for specific day. Hour averages.
ceps_power_balance Get CEPS power balance data for specific year. Max values.

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

dtvr-0.0.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

dtvr-0.0.3-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file dtvr-0.0.3.tar.gz.

File metadata

  • Download URL: dtvr-0.0.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1021-azure

File hashes

Hashes for dtvr-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d9d8f5b357cac9433ea8d42969ce5a049a85636219baede8c08bcd4b3c38058a
MD5 4f01d6965c5716732a85eab9ee2c8a7c
BLAKE2b-256 df948e574a169a7f70e3c9c478c135329369e3fea6a83b9dc80f700ca1ebb6c7

See more details on using hashes here.

File details

Details for the file dtvr-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: dtvr-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.5.0-1021-azure

File hashes

Hashes for dtvr-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cf6f9d2f1e229f048940677359fd0734b68bed1598052580bb348326d8e47904
MD5 ca6eb22a7169dbf75491d7cab6e531a9
BLAKE2b-256 1973a8af74b0af17219ba9ff9ee2d4789bdd4b2ce8756c288a0bae3a394b1ddb

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