Skip to main content

tryorchard-sdk

Python client for Orchard: create and drive iOS and Android sandboxes, manage snapshots, templates, teams and scoped API keys, and stream live channels (logs, shell, screen, adb, VNC, mitm, frida).

pip install tryorchard-sdk

Requires Python 3.10+. The import name is orchard_sdk.

Quickstart

from orchard_sdk import Orchard

orchard = Orchard.from_env()  # ORCHARD_API_URL + ORCHARD_API_KEY
# or: Orchard("https://orchard.example.com", "orc_live_xxx")

for s in orchard.sandboxes.list()["instances"]:
    print(s["name"], s["state"])

sb = orchard.sandbox("my-pixel")  # uuid, uuid prefix, name or tag
sb.start()
sb.apps.install("./build/app.apk")
sb.launch("com.example.app")
sb.tap_text("Sign in")

with open("screen.png", "wb") as f:
    f.write(sb.screenshot())

with sb.logs() as stream:
    for line in stream:
        print(line)

Configuration

Variable Purpose
ORCHARD_API_URL Control-plane URL, e.g. https://orchard.example.com
ORCHARD_API_KEY API key (orc_…) or JWT access token
ORCHARD_ORG Optional org slug (ignored for API keys)
ORCHARD_WS Optional workspace slug

Explicit arguments to Orchard(...) win over the environment. The client holds a connection pool: use it as a context manager or call close().

Live channels

Channels are context-managed iterators that work in ordinary synchronous code:

with sb.shell() as sh:
    sh.send("getprop ro.build.version.release\n")
    for out in sh:
        print(out, end="")

For asyncio code use orchard_sdk.aio.AsyncChannels:

import asyncio
from orchard_sdk import from_env
from orchard_sdk.aio import AsyncChannels

async def main():
    async for line in AsyncChannels(from_env(), sb.uuid).logs():
        print(line)

asyncio.run(main())

Expose a device channel on a local port for ordinary tools:

with sb.adb_bridge() as bridge:
    print(f"adb connect 127.0.0.1:{bridge.port}")

Errors

All errors derive from OrchardError: ApiError (HTTP status + server detail), SelectorError (zero or ambiguous sandbox match), ChannelClosedError (WebSocket closed with 4401/4403/4404/4502).

from orchard_sdk import ApiError, SelectorError

try:
    orchard.sandbox("pixel").start()
except SelectorError as e:
    print(e)
except ApiError as e:
    print(e.status, e.detail)

Documentation

  • API reference: every method, with examples
  • Examples: install and launch, UI test with snapshot rollback, frida tracing, traffic capture, adb bridge, scoped keys, log streaming

License

MIT

Metadata

Release files for tryorchard-sdk 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tryorchard-sdk 0.0.2
File Size Uploaded Provenance Actions
tryorchard_sdk-0.0.2.tar.gz 27.8 kB With provenance Details for tryorchard_sdk-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tryorchard-sdk 0.0.2
File Interpreter ABI Platform Actions
tryorchard_sdk-0.0.2-py3-none-any.whl Python 3 none any Details for tryorchard_sdk-0.0.2-py3-none-any.whl

Total release size: 57.6 kB

Release files / tryorchard_sdk-0.0.2.tar.gz

Download URL tryorchard_sdk-0.0.2.tar.gz
Size 27.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3b12b3962afc6af9c3512232d54ce86d5d5a567c447cb9acaec863ba8393bc25
BLAKE2b-256 checksum
How to use checksums
9aeb829d3ed6c1e9df8dd2a5aab5123d84c4d707a7b0b5801cb54a91fbbc8fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / tryorchard_sdk-0.0.2-py3-none-any.whl

Download URL tryorchard_sdk-0.0.2-py3-none-any.whl
Size 29.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea19ef5ccd0133fad962686dfafe9d761c29f00ae63ba6f0e0177e5fdb101a82
BLAKE2b-256 checksum
How to use checksums
50f695fd5f4550c903cfa155b1797f0bf7df1fc40bbf6b39a2f16ac6d569c67c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for tryorchard-sdk 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for tryorchard_sdk-0.0.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page