Skip to main content

Public Python SDK for Ona.

Project description

Ona Python SDK

The public Python SDK exposes stable workflows from ona_sdk. Generated protobuf modules remain available under gitpod.* for lower-level message types, but the SDK intentionally does not expose every raw backend RPC.

Install the package with pip install ona-sdk.

from ona_sdk import create_client_from_env

ona = create_client_from_env()
env = ona.environments().create("https://github.com/gitpod-io/template-golang-cli")

result = env.run_command(
    command="pwd && git status --short",
    working_directory=env.workspace_dir(),
)

print(result.stdout)

create_client_from_env() reads ONA_API_KEY. It uses https://app.ona.com/api by default and accepts ONA_BASE_URL for a custom management-plane domain, local development, or replay verification. Use create_client(api_key=..., base_url=...) to pass values explicitly.

Pass new_debug_logger() to the client to get human-readable SDK debug logs. The formatter uses ANSI colors by default and honors NO_COLOR; pass no_color=True when writing plain logs.

The SDK is structured as:

  • create_client* creates an SDK client for production Connect API calls.
  • client.environments() returns environment workflows.
  • environments.create/get/list/start/stop/delete manages environments.
  • Environment.run_command/read_file/write_file/git_changes performs environment ops.
  • Environment.start_codex starts Codex in that environment.
  • AgentSession.send_message/message_stream/watch_result interacts with the agent execution.

Runnable examples live in examples/.

The SDK uses Connect over the Python standard library HTTP stack. The package includes generated protobuf messages and type stubs, but it does not ship generated gRPC clients.

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

ona_sdk-0.1.0.tar.gz (317.0 kB view details)

Uploaded Source

Built Distribution

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

ona_sdk-0.1.0-py3-none-any.whl (369.1 kB view details)

Uploaded Python 3

File details

Details for the file ona_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ona_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 317.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ona_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d14fff6d98d45200d5d38993ce741c22bd37b954afd15e3a51916c4f405b30a0
MD5 13a704cb0f66301b41e9678763d6f020
BLAKE2b-256 50dee7a4e8bee609d37a951ead1611f146b4c144bf9a86349af556fbce2ca862

See more details on using hashes here.

Provenance

The following attestation bundles were made for ona_sdk-0.1.0.tar.gz:

Publisher: publish-public-sdks.yml on gitpod-io/gitpod-next

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ona_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ona_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 369.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ona_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bb5b6ec20ce419e2de4d2fb3e4b01411c8c7b2bb495eef6ec7d518451c6c5036
MD5 b6183676c8a046131014c701c1021aa0
BLAKE2b-256 551f8d4b68eaea6e0b32d0358162e70f14191bfb4ec88e3302974c1a527e560e

See more details on using hashes here.

Provenance

The following attestation bundles were made for ona_sdk-0.1.0-py3-none-any.whl:

Publisher: publish-public-sdks.yml on gitpod-io/gitpod-next

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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