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
Release history Release notifications | RSS feed
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.10a0.tar.gz
(24.8 kB
view details)
Built Distribution
File details
Details for the file lcpdelta-1.3.10a0.tar.gz
.
File metadata
- Download URL: lcpdelta-1.3.10a0.tar.gz
- Upload date:
- Size: 24.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc29a088eb4844e38f26d523e121e768f1903e9268d68daaaf6b09cd527f97aa |
|
MD5 | e1c3e036219f0f972f1c730602a783c8 |
|
BLAKE2b-256 | 698fbe621134f23e003af9ae80c70aca0d9e89eece4ab8e82afaee10179a4715 |
File details
Details for the file LCPDelta-1.3.10a0-py3-none-any.whl
.
File metadata
- Download URL: LCPDelta-1.3.10a0-py3-none-any.whl
- Upload date:
- Size: 33.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 284207f397ee62427ae62c0348f01cf142a3c1a2589ca87e706e259a162339e5 |
|
MD5 | 90d0cd4dff643da1b37c33edc6a964d4 |
|
BLAKE2b-256 | 24466e9992543098c64465a81f02a57b1c9570a29b60ea5fa2146d50b607956d |