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. This is perfect if you want something quick and dirty.

from octopus_energy import OctopusEnergyRestClient

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

client = OctopusEnergyClient(api_token)
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.5.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

octopus_energy-0.1.5-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octopus-energy-0.1.5.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.7.7 Linux/5.4.0-1033-gcp

File hashes

Hashes for octopus-energy-0.1.5.tar.gz
Algorithm Hash digest
SHA256 941385a6601a681cea875546026d9c2f8fbba402c7382559f272bf8391120861
MD5 7ba761f39e0a38740502107e107d6c04
BLAKE2b-256 5f1c9879d2cb78ec2b529f7d8be2323bce5ab5c51278fe9c43efb7eae63c4b34

See more details on using hashes here.

Provenance

File details

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

File metadata

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

File hashes

Hashes for octopus_energy-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 df8239f13fb6040b7c1938f9d83cf75002909c3e5a9185802aec88f34cd6f7e6
MD5 ea243f1f21784b3b253aff2ff67d4c96
BLAKE2b-256 64aa37852ace1b563770d3968513694148c797c84f88710be78a5384f244491b

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