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

Uploaded Python 3

File details

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

File metadata

  • Download URL: oe_sdk-0.1.0a3.tar.gz
  • Upload date:
  • Size: 176.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.0a3.tar.gz
Algorithm Hash digest
SHA256 43be8b1f0b6ce27a147b2f210cca10b86bfef807070bef81c3cebe96224df5ee
MD5 8ad6de2156d30fb803a5ca13d982daee
BLAKE2b-256 1e57507ec8b96f1f32d1a08799be06c1dfa5318c268baadd3bda9762cc0ef75d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: oe_sdk-0.1.0a3-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.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 6aa8475e7679aad5dd4570717585ddb985c6190ae40df4cef5b25800d277df3a
MD5 b8a5aa8c05a98a614bb0ae556f741899
BLAKE2b-256 1f7008677f76fec7d1248a1f45ad8bf34958559d64567f2838b17a59de1e62d4

See more details on using hashes here.

Provenance

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