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/deletemanages environments.Environment.run_command/read_file/write_file/git_changesperforms environment ops.Environment.start_codexstarts Codex in that environment.AgentSession.send_message/message_stream/watch_resultinteracts 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d14fff6d98d45200d5d38993ce741c22bd37b954afd15e3a51916c4f405b30a0
|
|
| MD5 |
13a704cb0f66301b41e9678763d6f020
|
|
| BLAKE2b-256 |
50dee7a4e8bee609d37a951ead1611f146b4c144bf9a86349af556fbce2ca862
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ona_sdk-0.1.0.tar.gz -
Subject digest:
d14fff6d98d45200d5d38993ce741c22bd37b954afd15e3a51916c4f405b30a0 - Sigstore transparency entry: 2288866562
- Sigstore integration time:
-
Permalink:
gitpod-io/gitpod-next@ecbd180689d7c2f550c15d96914a52d41b9411a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gitpod-io
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-public-sdks.yml@ecbd180689d7c2f550c15d96914a52d41b9411a1 -
Trigger Event:
workflow_dispatch
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb5b6ec20ce419e2de4d2fb3e4b01411c8c7b2bb495eef6ec7d518451c6c5036
|
|
| MD5 |
b6183676c8a046131014c701c1021aa0
|
|
| BLAKE2b-256 |
551f8d4b68eaea6e0b32d0358162e70f14191bfb4ec88e3302974c1a527e560e
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ona_sdk-0.1.0-py3-none-any.whl -
Subject digest:
bb5b6ec20ce419e2de4d2fb3e4b01411c8c7b2bb495eef6ec7d518451c6c5036 - Sigstore transparency entry: 2288866820
- Sigstore integration time:
-
Permalink:
gitpod-io/gitpod-next@ecbd180689d7c2f550c15d96914a52d41b9411a1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/gitpod-io
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-public-sdks.yml@ecbd180689d7c2f550c15d96914a52d41b9411a1 -
Trigger Event:
workflow_dispatch
-
Statement type: