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.0a4.tar.gz (175.7 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.0a4-py3-none-any.whl (20.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: oe_sdk-0.1.0a4.tar.gz
  • Upload date:
  • Size: 175.7 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.0a4.tar.gz
Algorithm Hash digest
SHA256 42761df9115ec8b6194edc5dae3a53964049ecd7e4561cb34dc6fd4816edd41b
MD5 f624bcad2cfa30568e7b2128b7b9d68b
BLAKE2b-256 502f83891f869c6f76d54a55c130548a4764b94b4f39145c60a67ecb658e2ee9

See more details on using hashes here.

Provenance

The following attestation bundles were made for oe_sdk-0.1.0a4.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.0a4-py3-none-any.whl.

File metadata

  • Download URL: oe_sdk-0.1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 20.4 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.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 bfb78dd4713e0d42bb0e81e7124ffe40c212d7ac139f9fbc265f301c2cbd11dd
MD5 5f740ae86fecbf09e4acb0aec427d9c7
BLAKE2b-256 80f362252dbaa30c9f037054fda2e981acb1f82c36c71112ea3710abb0801497

See more details on using hashes here.

Provenance

The following attestation bundles were made for oe_sdk-0.1.0a4-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