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.14.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

octopus_energy-0.1.14-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: octopus-energy-0.1.14.tar.gz
  • Upload date:
  • Size: 10.9 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.14.tar.gz
Algorithm Hash digest
SHA256 921b1650c033b330dd3915e5c6ad91a713a30c54c43cbb8f1904c18d964f3b82
MD5 f8d51b89a9c299f71fefd9d29f3c393d
BLAKE2b-256 0ab80e3e8cabe8f426df8792dc49ad6807b5f8ad46749222f9dc83b9e00429b9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: octopus_energy-0.1.14-py3-none-any.whl
  • Upload date:
  • Size: 14.1 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.14-py3-none-any.whl
Algorithm Hash digest
SHA256 86e8df72e5dee2a8cace963c0b018b75cff06f69c49c9d385929ed5f6617dcf8
MD5 39adec00225c2d926584c57f5f7b6992
BLAKE2b-256 197074122f5e461434b29afe9cdd8bed388363e5c1192293f8561f427a43f48f

See more details on using hashes here.

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