Skip to main content

LCPDelta Python Package

Project description

LCPDelta Python Package

This is the python wrapper to interact with all LCPDelta products through their API or DPS. To get started, install the latest version of the LCPDelta package.

To find out more about LCPDelta's data products, click here. To find out more about Enact, click here.

Enact API and DPS Instructions

Full instructions on how to utilise Enact's full API and DPS can be found here. Below are some examples to get you started.

Enact Series API Example Code

from lcp_delta import enact
from datetime import date

username = "insert_username_here"
public_api_key = "insert_public_api_key_here"

api_helper = enact.APIHelper(username, public_api_key)

# Example dates
from_date= date(2022,4,1)
to_date = date(2023,5,31)

# Example series
series_id = "LcpDemandvsGrid"

response = api_helper.get_series_data(
    series_id,
    from_date,
    to_date,
    country_id = "Gb",
    time_zone_id="UTC"
)

print(response)

Enact DPS Example Code

from lcp_delta import enact

def handle_new_information(x):
    # A callback function that will be invoked with the received series updates.
    # The function should accept one argument, which will be the data received from the series updates.
    print(x)

username = "insert_username_here"
public_api_key = "insert_public_api_key_here"

dps_helper = enact.DPSHelper(username, public_api_key)
# Input method to handle any update to the series, alongside the series ID, that can be found on Enact.
dps_helper.subscribe_to_series_updates(handle_new_information, "RealtimeDemand")

message = None
while message != "exit()":
    message = input(">> ")

#Terminate the connection at the end
dps_helper.terminate_hub_connection()

FLEXtrack API Example Code

import lcp_delta.flextrack as flextrack
from datetime import datetime as dt

user = "insert_username_here"
api_key = "insert_public_api_key_here"

api_helper = flextrack.APIHelper(user, api_key)

response = api_helper.get_exporter_data(
    date_from=dt(2022, 11, 1),
    date_to=dt(2023, 10, 31),
    countries=['Austria'],
    products=["RegelleistungFcrProcuredFourHourly","RegelleistungFcrProcuredDaily","RegelleistungAfrrProcured"],
    directions=["Symmetric", "Upward", "Downward"],
    market='Availability',
    metrics=['Volume', 'Price'],
    aggregation_types=['Average', 'Average'],
    granularity='Monthly'
)

response.head

Contributing

Check out our contribution guidelines and code of conduct.

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

lcpdelta-1.3.9.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

LCPDelta-1.3.9-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file lcpdelta-1.3.9.tar.gz.

File metadata

  • Download URL: lcpdelta-1.3.9.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for lcpdelta-1.3.9.tar.gz
Algorithm Hash digest
SHA256 707c600fb7713d7ff692654d6448899f498a28b77e3ae20058556ad59e8d5093
MD5 81607b7bcd2cab305302a2d89cce954c
BLAKE2b-256 5cef572486cf45d45c162b273aff49a88d4f74b3b55953f7f804ab6aba912af9

See more details on using hashes here.

File details

Details for the file LCPDelta-1.3.9-py3-none-any.whl.

File metadata

  • Download URL: LCPDelta-1.3.9-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for LCPDelta-1.3.9-py3-none-any.whl
Algorithm Hash digest
SHA256 591b0f4058270c9f18a825cb3c068a2d146d0fce56cc68efcf8da55fc04ea037
MD5 15f51868d600730e3c7ce2e389b913cb
BLAKE2b-256 40b598786a2222a1ed808044c93cb02de20a4e513d0783423b3ff7b903406339

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