Modern Python client for the Octopus Energy API
Project description
Pytentacle
Python client for the Octopus Energy API.
Installation
pip install pytentacle
Quick Start
from pytentacle import OctopusClient
# Initialise the client (reads from OCTOPUS_API_KEY environment variable by default)
client = OctopusClient()
# Or pass the API key directly
# client = OctopusClient(api_key="your_api_key_here")
# List all available products
products = client.products.list()
# Get specific product details
product = client.products.get("AGILE-24-04-03")
# Get electricity consumption for a meter
consumption = client.electricity.get_consumption(
mpan="1234567890123",
serial_number="12A3456789",
period_from="2024-01-01T00:00:00Z",
period_to="2024-01-31T23:59:59Z"
)
Async Support
from pytentacle import AsyncOctopusClient
# Uses OCTOPUS_API_KEY environment variable by default
async with AsyncOctopusClient() as client:
products = await client.products.list()
product = await client.products.get("AGILE-24-04-03")
Features
- ✅ Full type hints with Pydantic models
- ✅ Sync and async clients
- ✅ Automatic pagination handling
- ✅ Comprehensive error handling
API Coverage
This library implements all publicly available Octopus Energy API endpoints:
- Products (8 endpoints) - List products, get tariff rates and standing charges
- Electricity (2 endpoints) - Meter point details and consumption data
- Gas (1 endpoint) - Gas consumption data
- Industry (1 endpoint) - Grid Supply Point lookups
Note: Partner-only endpoints (accounts, quotes) are not implemented.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytentacle-0.1.0.tar.gz.
File metadata
- Download URL: pytentacle-0.1.0.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb9b479b3dbf2e201befe8346fe6d2805fb99c4db9ed0ff5f5745b2d3d731f64
|
|
| MD5 |
ad176f99c459553bf41b7f30249f94a9
|
|
| BLAKE2b-256 |
defa6bbb0eca1779e660518b7ac4ed16722db6cedac8c4d66a94978abaaf1aa1
|
Provenance
The following attestation bundles were made for pytentacle-0.1.0.tar.gz:
Publisher:
publish.yml on samdobson/pytentacle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytentacle-0.1.0.tar.gz -
Subject digest:
eb9b479b3dbf2e201befe8346fe6d2805fb99c4db9ed0ff5f5745b2d3d731f64 - Sigstore transparency entry: 569697571
- Sigstore integration time:
-
Permalink:
samdobson/pytentacle@ac941c7e1efb56ddea694a78407094ea668823cc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samdobson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac941c7e1efb56ddea694a78407094ea668823cc -
Trigger Event:
release
-
Statement type:
File details
Details for the file pytentacle-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pytentacle-0.1.0-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58791da18b1ae43f8582b43b65d8e205cc88c137b2d6ebfc5533abe6771ccdbc
|
|
| MD5 |
1d54fd5fca9eb9abe0056cc00770a5f2
|
|
| BLAKE2b-256 |
f5a712c55b85c261c102c678fa4f18819a509f7f99c976a63413104a49c69194
|
Provenance
The following attestation bundles were made for pytentacle-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on samdobson/pytentacle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytentacle-0.1.0-py3-none-any.whl -
Subject digest:
58791da18b1ae43f8582b43b65d8e205cc88c137b2d6ebfc5533abe6771ccdbc - Sigstore transparency entry: 569697583
- Sigstore integration time:
-
Permalink:
samdobson/pytentacle@ac941c7e1efb56ddea694a78407094ea668823cc -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/samdobson
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ac941c7e1efb56ddea694a78407094ea668823cc -
Trigger Event:
release
-
Statement type: