Python SDK for Octopus Energy.
Project description
oe-sdk
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42761df9115ec8b6194edc5dae3a53964049ecd7e4561cb34dc6fd4816edd41b
|
|
| MD5 |
f624bcad2cfa30568e7b2128b7b9d68b
|
|
| BLAKE2b-256 |
502f83891f869c6f76d54a55c130548a4764b94b4f39145c60a67ecb658e2ee9
|
Provenance
The following attestation bundles were made for oe_sdk-0.1.0a4.tar.gz:
Publisher:
publish.yml on octopus-energy/python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oe_sdk-0.1.0a4.tar.gz -
Subject digest:
42761df9115ec8b6194edc5dae3a53964049ecd7e4561cb34dc6fd4816edd41b - Sigstore transparency entry: 1601585460
- Sigstore integration time:
-
Permalink:
octopus-energy/python-sdk@c771b080cb3c6240d3ecf7ba933815af75bd9ac1 -
Branch / Tag:
refs/tags/v0.1.0a4 - Owner: https://github.com/octopus-energy
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c771b080cb3c6240d3ecf7ba933815af75bd9ac1 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bfb78dd4713e0d42bb0e81e7124ffe40c212d7ac139f9fbc265f301c2cbd11dd
|
|
| MD5 |
5f740ae86fecbf09e4acb0aec427d9c7
|
|
| BLAKE2b-256 |
80f362252dbaa30c9f037054fda2e981acb1f82c36c71112ea3710abb0801497
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
oe_sdk-0.1.0a4-py3-none-any.whl -
Subject digest:
bfb78dd4713e0d42bb0e81e7124ffe40c212d7ac139f9fbc265f301c2cbd11dd - Sigstore transparency entry: 1601585575
- Sigstore integration time:
-
Permalink:
octopus-energy/python-sdk@c771b080cb3c6240d3ecf7ba933815af75bd9ac1 -
Branch / Tag:
refs/tags/v0.1.0a4 - Owner: https://github.com/octopus-energy
-
Access:
internal
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c771b080cb3c6240d3ecf7ba933815af75bd9ac1 -
Trigger Event:
release
-
Statement type: