Skip to main content

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, SdkModule Protocol, dual-gateway BaseGraphQLClient (workspace + global), AuthStore with pluggable TokenStore (InMemoryTokenStore, FileTokenStore, EnvTokenStore), error hierarchy with token redaction, structured logger, ModuleRegistry.
  • Modules (src/burdenoff_sdk_libs/modules/<name>/): __init__.py exports SdkModule instance. operations.py holds hand-written GraphQL doc strings. api.py builds the API. Generated types land at src/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 plain Exception, 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

  1. mkdir src/burdenoff_sdk_libs/modules/<id> with __init__.py, operations.py, api.py, types.py.
  2. Export SdkModule instance from __init__.py (e.g. auth_module = AuthModule()).
  3. Add to _LAZY_MODULES in top-level __init__.py if surfacing at package root.
  4. Add manifest entry to schema/modules.yaml.
  5. 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>.yaml run 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

burdenoff_sdk_libs-2026.722.1.tar.gz (714.3 kB view details)

Uploaded Source

Built Distribution

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

burdenoff_sdk_libs-2026.722.1-py3-none-any.whl (930.5 kB view details)

Uploaded Python 3

File details

Details for the file burdenoff_sdk_libs-2026.722.1.tar.gz.

File metadata

  • Download URL: burdenoff_sdk_libs-2026.722.1.tar.gz
  • Upload date:
  • Size: 714.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.14

File hashes

Hashes for burdenoff_sdk_libs-2026.722.1.tar.gz
Algorithm Hash digest
SHA256 c7d773228beb6dbc33a37d647f3c253eff97c77ee6d8873fb0c9dcf36b55f3ca
MD5 98da612797d4ee281b7b563ffdf98e62
BLAKE2b-256 29f732a4b833e5b9368d39f9a3bd9b6c2504d049ba2842b43b5ee8e9c6c23bc3

See more details on using hashes here.

File details

Details for the file burdenoff_sdk_libs-2026.722.1-py3-none-any.whl.

File metadata

File hashes

Hashes for burdenoff_sdk_libs-2026.722.1-py3-none-any.whl
Algorithm Hash digest
SHA256 82aad3d8a5191db1882926bf9292b59d1c29d946b2b8844a454d43100c9622ea
MD5 024baba7c226696b83501e864bdde2f4
BLAKE2b-256 d4dbcae63ad65c45ede1aa2beacd07fcea25d6f664519766079feb06773db058

See more details on using hashes here.

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