Skip to main content

Python client for the Octopus Energy RESTful API

Project description

Octopus Energy Python API Client Library

A Client library for accessing the Octopus Energy APIs

Warning: The API is currently undergoing active development and should be considered unstable, even volatile until it reaches version 1.0.0

PyPI version PyPI - Python Version

Build Status Coverage Status

Installation

octopus-energy can be installed from PyPI using pip:

pip install octopus-energy

Code

The code is available in the octopus-energy repository on GitHub

Features

  • Get energy consumption from SMETS1 and SMETS2 electricity and gas meters.

Quickstart

You can obtain your API token and meter information from the Octopus Energy Developer Dashboard.

REST Client Wrapper

The REST client wrapper is a slim shim over the REST API that returns dictionaries as responses.

Note that you should reference the Octopus Energy API documentation for detailed notes on the API responses
and specifics around the request parameters.

from octopus_energy import OctopusEnergyRestClient

api_token="sk_live_your-token"
mprn = "your-mprn"
serial_number = "your-meter-serial-number"

async with OctopusEnergyRestClient(api_token) as client:
  consumption = await client.get_gas_consumption_v1(mprn, serial_number)

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

octopus-energy-0.1.13.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

octopus_energy-0.1.13-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

Details for the file octopus-energy-0.1.13.tar.gz.

File metadata

  • Download URL: octopus-energy-0.1.13.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.3 Linux/5.4.0-1036-gcp

File hashes

Hashes for octopus-energy-0.1.13.tar.gz
Algorithm Hash digest
SHA256 03c3a066260576daaa72ce9545d765bf14bd4b47b88cb6874e15e645ae994e35
MD5 7d13f9b0d6cd3944f077fba337085f20
BLAKE2b-256 e81de7e6c2ab8e92ffd07ce1ea6285252cf0680882ef3f728d92ed3e66dfe3f4

See more details on using hashes here.

Provenance

File details

Details for the file octopus_energy-0.1.13-py3-none-any.whl.

File metadata

  • Download URL: octopus_energy-0.1.13-py3-none-any.whl
  • Upload date:
  • Size: 13.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.3 Linux/5.4.0-1036-gcp

File hashes

Hashes for octopus_energy-0.1.13-py3-none-any.whl
Algorithm Hash digest
SHA256 779d81d38694e73d8f66bfa6a5ff0070a244f6eaf7eeeeb433f0a71661a83d1a
MD5 16ccd09bba9f4b1f26a8ea8bbb60de3b
BLAKE2b-256 e2da9ef82d35785e2e8a3a71251d23810786b8a083414b1472d11205a942466b

See more details on using hashes here.

Provenance

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