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.1.tar.gz (318.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.1-py3-none-any.whl (369.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ona_sdk-0.1.1.tar.gz
  • Upload date:
  • Size: 318.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.1.tar.gz
Algorithm Hash digest
SHA256 5d9afc0bd6fe3723a81b63304491ff05effcf832083b71308bd44f0311b97e71
MD5 09e119302e79e8cfa408e5762c862d99
BLAKE2b-256 ee1e481435cf327c731a9d0c655683849a548d2493be455d1ee4f38c7ec4e2b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for ona_sdk-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: ona_sdk-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 369.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 943ce3d639bd707d4585e0071bb21e05073479450f13aa1b18469cfe61875050
MD5 20782b6fe2e1527d0032507a6c247855
BLAKE2b-256 3cba6725d13dc85c59db819be87cf097ca3db251829fb09f6fe8fdedc38282bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for ona_sdk-0.1.1-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