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.
Release files for pytentacle 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytentacle-0.1.1.tar.gz | 1.7 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytentacle-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size:1.7 MB
Release files / pytentacle-0.1.1.tar.gz
| Download URL | pytentacle-0.1.1.tar.gz |
|---|---|
| Size | 1.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd6ea2b01eba2e8936b56b31115ab2f6c244563d4a539a8fb3311668366c2be4
|
|
BLAKE2b-256 checksum How to use checksums |
26db56ed8136a214e148536b9c7d21c75124c9ff367d902aca5163cf15c70bf7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2025.
Transparency logRelease files / pytentacle-0.1.1-py3-none-any.whl
| Download URL | pytentacle-0.1.1-py3-none-any.whl |
|---|---|
| Size | 21.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9766de1e50648b8a65ead8dbc31f50de8c240cd49cbfda02e1aed042f54c27e3
|
|
BLAKE2b-256 checksum How to use checksums |
f1707aa59519d56d4b04b753fb63061a3aa9e2c180afee0e9a10df0983f2b5a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 8, 2025.
Transparency log