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.
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 plan data for specific day. Hour averages.
ceps_generation_renewable_source_actual Get CEPS generation plan data for specific day. Hour averages.
ceps_generation_renewable_source_daily Get CEPS generation plan data for specific day. Hour averages.
ceps_imbalance_price_prediction Get CEPS generation plan data for specific day. Hour averages.
ceps_power_balance Get CEPS generation plan data for specific day. Hour averages.

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.2.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

dtvr-0.0.2-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dtvr-0.0.2.tar.gz
  • Upload date:
  • Size: 8.9 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.2.tar.gz
Algorithm Hash digest
SHA256 8270f4a9cee89a24b40e774b54b021bff8c6f082546a8f88646afefa0b163bc6
MD5 ef9f55a7671aeece4a3c68c6221d8e66
BLAKE2b-256 4a3d077525cd5875a98e71b97fbfa364121b509506116d22330899045adb8c34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dtvr-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.6 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 61a6e21e85d6d07c74b8d8055c379d9fc425538d137894f1db6fa166db7cca67
MD5 f287fd7b88e42631cc21cbb97bb71120
BLAKE2b-256 a5fc9755cbfd0e59d96947666c33b8ea2f6157314599fcb818ee149959b02b48

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