Modular SDK library shared across all Burdenoff product SDKs (Python). Each module exposes attach(ctx) returning a typed API; product SDKs pick which modules to mount. Sister to @burdenoff/cli-sdk.
Project description
burdenoff-sdk-libs
Modular SDK library shared across all Burdenoff product SDKs (Python).
Each module under src/burdenoff_sdk_libs/modules/<name>/ exports an SdkModule (a dataclass with attach(ctx) -> API). Product SDKs (vibecontrols-sdk-python, botlit-sdk-python, etc.) become thin shells that pick which modules to mount. Sister to @burdenoff/sdk-libs (Node) and @burdenoff/cli-sdk.
Architecture
- Core (
src/burdenoff_sdk_libs/core/):SdkContext,SdkModuleProtocol, dual-gatewayBaseGraphQLClient(workspace + global),AuthStorewith pluggableTokenStore(InMemoryTokenStore,FileTokenStore,EnvTokenStore), error hierarchy with token redaction, structured logger,ModuleRegistry. - Modules (
src/burdenoff_sdk_libs/modules/<name>/):__init__.pyexportsSdkModuleinstance.operations.pyholds hand-written GraphQL doc strings.api.pybuilds the API. Generated types land atsrc/burdenoff_sdk_libs/modules/<name>/__generated__/types.py(gitignored). - PEP 562 lazy imports: top-level
__getattr__defers module loading until first access (lambda/edge cold-start friendly). - Hard rules: Modules NEVER import each other directly — use
ctx.modules.get('id'). Modules NEVER print, raise plainException, or log secrets unredacted.
Build & Commands
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest # unit tests
pytest --cov # with coverage
python scripts/codegen.py # generate types from pinned supergraph
python scripts/parity_check.py # cross-language manifest diff vs sdk-libs-node
python -m build # sdist + wheel
Adding a module
mkdir src/burdenoff_sdk_libs/modules/<id>with__init__.py,operations.py,api.py,types.py.- Export
SdkModuleinstance from__init__.py(e.g.auth_module = AuthModule()). - Add to
_LAZY_MODULESin top-level__init__.pyif surfacing at package root. - Add manifest entry to
schema/modules.yaml. - Mirror in
~/products/sdk-libs-node/in the SAME PR pair.
Testing
- Unit (
tests/test_*.py): pure logic. No HTTP. pytest, <5s. - Integration: respx intercepts HTTP. Mock factories derived from
__generated__/types.py. - E2E: real svc + state, run nightly.
- Parity: same
tests/parity/<scenario>.yamlrun by node + python.
Reference
~/products/sdk-libs-node/— sister Node library.~/products/cli-sdk/— sister CLI library.~/products/vibecontrols/vibecontrols-sdk-python/— first consumer (thin shell).~/products/dev/audit/index/vibecontrols.md— 23-module ground-truth.
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 burdenoff_sdk_libs-2026.527.3.tar.gz.
File metadata
- Download URL: burdenoff_sdk_libs-2026.527.3.tar.gz
- Upload date:
- Size: 182.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59be691271f9b257e3d9c9a395b95bf5afcae75b067351f104a9d293681de27f
|
|
| MD5 |
2d7ef8c65bf9fad039750ff286449c41
|
|
| BLAKE2b-256 |
14a689c4261808ee9a4cb3c719f794119c868e554f01d7ea9ff3c3e2e9de7705
|
File details
Details for the file burdenoff_sdk_libs-2026.527.3-py3-none-any.whl.
File metadata
- Download URL: burdenoff_sdk_libs-2026.527.3-py3-none-any.whl
- Upload date:
- Size: 249.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b028d873d4ede4b5fca4b4cdb0dab27a799aa7c3b635178d3a2b0b954e9d40e8
|
|
| MD5 |
a181579e2c1962a4006924dabfa441de
|
|
| BLAKE2b-256 |
bd4f8f6734f5c42bbf0feb34483b939b5ac01235fb0b8c1a3a6903407c382b15
|