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 Get procured balancing capacity data from daily auction for the specified area domain and time interval.
ceps_current_system_imbalance_actual 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 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.

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

Uploaded Source

Built Distribution

dtvr-0.0.1-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dtvr-0.0.1.tar.gz
  • Upload date:
  • Size: 8.6 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.1.tar.gz
Algorithm Hash digest
SHA256 279a3230a32562e64a1b7f6cc89d81f777e4bd61e02ecf440ae215a78f9e9e29
MD5 5c0807fd67d699772d6b61470c6c6bf7
BLAKE2b-256 5a177e1c9fe1cdb0650ea90e6319afa6b79490d496b99bd0d5aa3fdbe57013e7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dtvr-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1faa63b4f8e0417ab41244cfd14765f2bfddd6096b147e286431fcfe124e3d1c
MD5 f5749dfb83a01352e1a53087c182f2e2
BLAKE2b-256 55c2b7e7d544982cc0b83326dceebf097b8185efa1197872995db060857103ce

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