Skip to main content

Python SDK for Octopus Energy.

Project description

oe-sdk

Python 3.12+ Pydantic v2 Ruff

Octopus Energy Python SDK.

oe-sdk provides standardised, production-ready plumbing for common infrastructure so that services benefit from consistent, safe, and well-maintained implementations. It is not a collection of high-level API wrappers or opinionated utilities, it provides the core building blocks that every service can use to interact with external systems in a reliable, predictable way.

Example: uv add oe-sdk[s3], write a with S3Client() as s3:, and get straight to the actual work.

Philosophy

The SDK exists so engineers can focus on business problems, not infrastructure plumbing.

Every team eventually needs to talk to a common service. Without a shared foundation, each team ends up writing its own version, copy-pasted from a blog post, a previous project, or a colleague's Slack snippet. These ad-hoc implementations are rarely tested, inconsistently configured, and silently diverge over time.

The SDK solves this by providing a single, trusted source for that plumbing.

What belongs in the SDK

  • Obviously common things. If nearly every service needs it (S3 access, a common internal API, a team's data control plane, etc.), it belongs here.
  • Patterns duplicated in 2+ places. If two or more teams have independently written the same integration, that's a sign for us. We extract it, test it properly, and put it in the SDK so nobody has to write it again.

What the SDK is not

  • Not a framework. It doesn't dictate how you structure your application, which web framework you use, or how you organise your business logic.
  • Not opinionated about your domain. It handles the infrastructure layer and gets out of the way. Your modelling, your validation rules, your API design.

Design principles

  • Minimal surface, maximum trust. Each module does the smallest useful thing well: lifecycle, config, retries, logging, and exposes the raw underlying client for everything else. No leaky abstractions that go stale when the upstream library adds features.
  • Tested and validated. Every module ships with tests. Configuration is validated at construction. If you can instantiate it, it's correctly configured.
  • Consistent patterns. Same context-manager lifecycle, same Pydantic config, same sync/async split, same naming conventions. Learn one module, you can instinctively know them all.
  • Unopinionated where possible. The SDK follows established best practices but doesn't force architectural choices on callers.

Installation

Install the core SDK:

uv add oe-sdk

Then enable the modules you need via extras:

uv add oe-sdk[s3]          # S3 client plumbing

Multiple extras can be combined:

uv add oe-sdk[s3,...]      # add more as they become available

Modules

Each module has its own README with full usage, configuration, and testing guidance.

Module Extra Description Docs
s3 oe-sdk[s3] Context-managed sync & async S3 clients with retry, timeout, and logging README

Contributing

See CONTRIBUTING.md for development setup, design decisions, and guidance on adding new modules.

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

oe_sdk-0.1.0a2.tar.gz (176.8 kB view details)

Uploaded Source

Built Distribution

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

oe_sdk-0.1.0a2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file oe_sdk-0.1.0a2.tar.gz.

File metadata

  • Download URL: oe_sdk-0.1.0a2.tar.gz
  • Upload date:
  • Size: 176.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for oe_sdk-0.1.0a2.tar.gz
Algorithm Hash digest
SHA256 cee27714fa0a371ee1e61735751a48043f2125c21d065bc03589b26d1412dbe0
MD5 a31846c918f00eecc00cc486d521f6b4
BLAKE2b-256 fd12bd1e8ca6aede16568357041b70e9bfd51340c3809240da6653be08d2c3cf

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on octopus-energy/python-sdk

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

File details

Details for the file oe_sdk-0.1.0a2-py3-none-any.whl.

File metadata

  • Download URL: oe_sdk-0.1.0a2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for oe_sdk-0.1.0a2-py3-none-any.whl
Algorithm Hash digest
SHA256 6bd5504d807c4162eaa77c37fe75bf7c7f5be10e17b9a25f37b59bc81d23ac86
MD5 24b08509865a4a66cb2ce50d42505b77
BLAKE2b-256 b8c03134fc3fe6c13d68b0bb66474074f7634e8990d7c4d7a01017e01414bc6f

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on octopus-energy/python-sdk

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