Skip to main content

Python client for the Octopus energy API

Project description

Octopy-Energy

Python client for the Octopus energy API


Installing Octopy-Energy

The first step to getting running with the library is to install it through pip.

! pip install octopyenergy
Requirement already satisfied: octopyenergy in c:\users\user\path\to\octopy-energy (0.0.1)

Once installed octopyenergy can be imported into your scripts.

import octopyenergy as oe
from octopyenergy.api import DownloadManager

User Inputs

We now need to assign values for our account/meter details.

N.b. we recommend that you store your account details in a .env file and then use the dotenv library to set them as environment variables, which can in turn be picked up by os and assigned to local variables.

octopus_api_key = 'your_octopus_api_key'
meter_mpan = 'your_meter_mpan'
meter_serial = 'your_meter_serial'

Configuring the Download Manager

We'll start by initialising the DownloadManager, when we do so we can pass a number of parameters which will configure defaults in the download manager. The octopus_api_key is also required for some requests.

download_manager = DownloadManager(meter_mpan=meter_mpan, 
                                   meter_serial=meter_serial, 
                                   api_key=octopus_api_key)

download_manager
Welcome to the octopyenergy DownloadManager! For more information please read the documentation at https://github.com/AyrtonB/Octopy-Energy.

The following API end-points are available: 
retrieve_products, retrieve_product, retrieve_tariff_charges, retrieve_meter_point, retrieve_electricity_consumption, retrieve_gas_consumption, retrieve_gsps

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

octopyenergy-0.0.4.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

octopyenergy-0.0.4-py3-none-any.whl (5.8 kB view details)

Uploaded Python 3

File details

Details for the file octopyenergy-0.0.4.tar.gz.

File metadata

  • Download URL: octopyenergy-0.0.4.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.0 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.8

File hashes

Hashes for octopyenergy-0.0.4.tar.gz
Algorithm Hash digest
SHA256 6eb10cef39bf542b44fb1a5e57f5ca3234f8017dbac3936a4671e0ac69235bf8
MD5 a2cd95e2e32b96ce5af07ceb2172ed51
BLAKE2b-256 d6d6917313041dea2df83e4f7a4ac3de3d3e2bccc7ec21e25445f999b409566e

See more details on using hashes here.

File details

Details for the file octopyenergy-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: octopyenergy-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 5.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.0 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.7.8

File hashes

Hashes for octopyenergy-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 83d67d344e939ce994fea1d34d081d259275164af2bf045e9838269b4f183c9c
MD5 1a6164bafc5a75c1e5ce9efb49d1918e
BLAKE2b-256 ea2d82f6605cbe0ceb731e6f1a1f3b85fe8f9ad14fcaa1748f3394942dc1ed73

See more details on using hashes here.

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