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.0rc2.tar.gz (23.0 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.0rc2-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: electricityinfo_nz-1.0.0rc2.tar.gz
  • Upload date:
  • Size: 23.0 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.0rc2.tar.gz
Algorithm Hash digest
SHA256 0597400b452d92a8687035752f903f6ee644fe8b78e446ea618591bb548e32a4
MD5 0a5282145cbd02f980965ed143c66c70
BLAKE2b-256 72b5a19c19b62f19c4177bda700c4f07b44f6a7a830d20f7f9d87c86f807ce28

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricityinfo_nz-1.0.0rc2.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.0rc2-py3-none-any.whl.

File metadata

File hashes

Hashes for electricityinfo_nz-1.0.0rc2-py3-none-any.whl
Algorithm Hash digest
SHA256 8dfa660f165c43dbcfa5b7a44332cf637bb76eb6fc762180399849b63aab3ecb
MD5 28acf166aec2e67c4e94f34e0cd7b29e
BLAKE2b-256 3a4713b162af29b42ec36b5a1bb27ad78c581dbf87cafc070630dec5019e9339

See more details on using hashes here.

Provenance

The following attestation bundles were made for electricityinfo_nz-1.0.0rc2-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