The Typescript SDK is available on NPM.It supports accessing the API synchronously and asynchronously, and includes a built in data and record table tools for analysing data.
import { OpenElectricityClient } from 'openelectricity'// Initialize the clientconst client = new OpenElectricityClient()// Get energy data for the NEMconst { datatable } = await client.getNetworkData('NEM', ['energy'], { interval: '1h', dateStart: '2024-01-01T00:00:00', dateEnd: '2024-01-02T00:00:00', primaryGrouping: 'network_region',})// Analyze the dataconsole.table(datatable.toConsole())
The Python SDK is available on PyPI.It supports accessing the API synchronously and asynchronously, and exporting results to either pandas or polars DataFrames.
from openelectricity import OpenElectricityClient# Initialize the clientclient = OpenElectricityClient()# Get energy data for the NEMdatatable = client.get_network_data('NEM', ['energy'], { interval: '1h', dateStart: '2024-01-01T00:00:00', dateEnd: '2024-01-02T00:00:00', primaryGrouping: 'network_region',})