Skip to content

Good first issue: add Python SDK (mirrors TypeScript SDK) #4

@pshkv

Description

@pshkv

What

Create a Python gateway client SDK at sdks/python/ that mirrors the TypeScript SDK in sdks/typescript/.

Why

Many robotics environments use Python (ROS 2 Python bindings, MAVLink pymavlink). A native Python SDK removes the need for subprocess calls to the TypeScript client.

Spec

The SDK should expose the same operations as sdks/typescript/src/index.ts:

  • intercept(request)PolicyDecision
  • issueToken(params)SintCapabilityToken
  • revokeToken(tokenId)
  • getLedger(filters) → events
  • pendingApprovals() → list
  • resolveApproval(requestId, approved)
  • delegateToken(parentTokenId, params) → token

Use httpx (async) with a 10s timeout default. Raise SintError(status_code, code, message) on non-2xx.

Reference

TypeScript SDK: sdks/typescript/src/index.ts
TypeScript SDK tests: sdks/typescript/src/__tests__/client.test.ts

The Python SDK should have matching tests using pytest-httpx to mock the gateway.

Files to create

sdks/python/
  pyproject.toml         # name: sint-sdk, requires: httpx>=0.27
  sint/
    __init__.py
    client.py            # SintClient class
    errors.py            # SintError
    types.py             # TypedDict definitions
  tests/
    test_client.py
  README.md

Acceptance criteria

  • All TypeScript SDK operations have Python equivalents
  • Tests pass with pytest
  • Type annotations throughout (mypy --strict)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions