Skip to main content

Python client for the WITS Market Prices API (Electricity Info NZ)

Project description

electricityinfo-nz

CI Status Test coverage percentage

uv Ruff pre-commit

PyPI Version Supported Python versions License


Documentation: https://github.com/dan-s-github/api-electricityinfo-nz/blob/main/docs/index.md

Source Code: https://github.com/dan-s-github/api-electricityinfo-nz


Python client for the WITS Market Prices API (/api/market-prices/v1) for New Zealand wholesale electricity prices.

Installation

Install this via pip:

pip install electricityinfo-nz

Requires Python 3.9+.

Quick start

Create credentials in the WITS Developer Portal:

  1. Sign up in the portal.
  2. Create an application under My Apps.
  3. Copy the generated Client ID and Client Secret.
  4. Enable the API services your application needs.

Official guide: https://developer.electricityinfo.co.nz/WITS/guides

from electricityinfo_nz import MarketPricesClient

client = MarketPricesClient(
    client_id="YOUR_CLIENT_ID",
    client_secret="YOUR_CLIENT_SECRET",
)

result = client.get_schedule_prices(
    schedule="PRSL",
    market_type="E",
    nodes=["OTA2201"],
    forward=48,
)

For a next-24h forecast, use PRSL by default. Use market_type="E" for energy prices and market_type="R" for reserve prices. Prices are expressed in NZD/MWh.

More detailed guides:

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package wraps the Electricity Info NZ / WITS Market Prices API for the New Zealand wholesale electricity market and is guided by the official WITS Developer Portal documentation.

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

electricityinfo_nz-1.0.0rc1.tar.gz (20.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

electricityinfo_nz-1.0.0rc1-py3-none-any.whl (13.3 kB view details)

Uploaded Python 3

File details

Details for the file electricityinfo_nz-1.0.0rc1.tar.gz.

File metadata

  • Download URL: electricityinfo_nz-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 20.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for electricityinfo_nz-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 1521c74d1c3a1e8e37bd8632e5fcde4a3b799ca1868761d609b685a38f21d8f6
MD5 cfc786f5ea4722718cfb21f56843bdce
BLAKE2b-256 08f548e1c3ad78a71b0256abc80a36f37a911d2c521744a26b436b3af4e8bdcd

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricityinfo_nz-1.0.0rc1.tar.gz:

Publisher: ci.yml on dan-s-github/api-electricityinfo-nz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file electricityinfo_nz-1.0.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for electricityinfo_nz-1.0.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 51c25120899f14fd3c50311581982474f06c1f69e470a1f9b0e7c9f3278fcd01
MD5 e9462587934ece8b5191090e916cbb6e
BLAKE2b-256 8e39bc4e3edaa60413a4899cc04ccd205ab6462c50488410418059c7100f496e

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricityinfo_nz-1.0.0rc1-py3-none-any.whl:

Publisher: ci.yml on dan-s-github/api-electricityinfo-nz

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page