Skip to main content

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

Metadata

Release files for octopyenergy 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for octopyenergy 0.0.4
File Size Uploaded
octopyenergy-0.0.4.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for octopyenergy 0.0.4
File Interpreter ABI Platform
octopyenergy-0.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / octopyenergy-0.0.4.tar.gz

Download URL octopyenergy-0.0.4.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6eb10cef39bf542b44fb1a5e57f5ca3234f8017dbac3936a4671e0ac69235bf8
BLAKE2b-256 checksum
How to use checksums
d6d6917313041dea2df83e4f7a4ac3de3d3e2bccc7ec21e25445f999b409566e
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / octopyenergy-0.0.4-py3-none-any.whl

Download URL octopyenergy-0.0.4-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83d67d344e939ce994fea1d34d081d259275164af2bf045e9838269b4f183c9c
BLAKE2b-256 checksum
How to use checksums
ea2d82f6605cbe0ceb731e6f1a1f3b85fe8f9ad14fcaa1748f3394942dc1ed73
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.0.4 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page