Skip to content

Add high-level execute(code) helper for Python execution #1816

Description

@dhirajsb

Motivation

OpenShell already exposes lower-level execution paths, but common Python code execution should be available through a small, ergonomic helper. A high-level execute(code) API would make the Python SDK easier to use for agent and notebook-style workflows without changing the underlying protocol.

Proposed change

Add a Python SDK method similar to:

result = sandbox.execute("print('hello from OpenShell')")

The helper should wrap the existing exec_python / exec path where appropriate, preserve the lower-level APIs, and return the same execution result information callers can inspect today.

Acceptance criteria

  • Add a documented high-level execute(code: str, ...) helper to the Python SDK.
  • Preserve existing lower-level execution APIs without breaking changes.
  • Include unit tests for success, failure, timeout/error propagation, and result shape.
  • Add a README or docs example showing simple Python execution.

Notes

This should be SDK-only and should not require gateway/proto changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions