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.1.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.1-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file pytentacle-0.1.1.tar.gz.

File metadata

  • Download URL: pytentacle-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 dd6ea2b01eba2e8936b56b31115ab2f6c244563d4a539a8fb3311668366c2be4
MD5 7d2cedefdac47a567ecb8976aa8ef7e6
BLAKE2b-256 26db56ed8136a214e148536b9c7d21c75124c9ff367d902aca5163cf15c70bf7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytentacle-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: pytentacle-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9766de1e50648b8a65ead8dbc31f50de8c240cd49cbfda02e1aed042f54c27e3
MD5 a315e7368c57fb1acafff15c61b5d2ad
BLAKE2b-256 f1707aa59519d56d4b04b753fb63061a3aa9e2c180afee0e9a10df0983f2b5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytentacle-0.1.1-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