Skip to main content

Modern Python client for the Octopus Energy API

Project description

Package version Python versions License Ruff py.typed Coverage Status

Hero

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytentacle-0.1.0.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

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

pytentacle-0.1.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

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

Hashes for pytentacle-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb9b479b3dbf2e201befe8346fe6d2805fb99c4db9ed0ff5f5745b2d3d731f64
MD5 ad176f99c459553bf41b7f30249f94a9
BLAKE2b-256 defa6bbb0eca1779e660518b7ac4ed16722db6cedac8c4d66a94978abaaf1aa1

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytentacle-0.1.0.tar.gz:

Publisher: publish.yml on samdobson/pytentacle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pytentacle-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 58791da18b1ae43f8582b43b65d8e205cc88c137b2d6ebfc5533abe6771ccdbc
MD5 1d54fd5fca9eb9abe0056cc00770a5f2
BLAKE2b-256 f5a712c55b85c261c102c678fa4f18819a509f7f99c976a63413104a49c69194

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytentacle-0.1.0-py3-none-any.whl:

Publisher: publish.yml on samdobson/pytentacle

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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