finally so it stops
even when your code raises.
client.computers.create()
Start a Windows desktop and return once it is ready to drive.
| Parameter | Type | Default | Description |
|---|---|---|---|
viewport | dict | None | 1920 x 1080 | {"width", "height"}: the desktop’s resolution. It must be one of the display modes below. |
tier | str | None | "standard" | Live-view video quality: standard, high or extra_high. Higher tiers cost more per hour. |
telemetry | bool | None | True | False turns off the computer’s event stream for its life. |
ComputerSession.
Raises InvalidArgsError for a viewport that isn’t a display mode.
Display modes: 1024x768, 1280x720, 1280x800, 1280x1024, 1366x768, 1440x900,
1536x864, 1600x900, 1680x1050, 1920x1080, 1920x1200, 2560x1440. Change it later
with pc.display.set_size().
client.computers.get()
ComputerSession, including its recording once ready.
client.computers.list()
Your organization’s computers, newest first.
| Parameter | Type | Default | Description |
|---|---|---|---|
status | str | None | None | Only "starting", "active" or "ended" computers. |
limit | int | 50 | How many to return. |
list[ComputerSession].
client.computers.stop()
End a computer. Its machine is reset for the next customer.
ComputerSession
Whatcreate(), get() and list() return.
| Member | Type | Description |
|---|---|---|
id | str | The computer id. |
status | str | starting, active or ended. |
control_url | str | None | The DCP WebSocket URL, with a short-lived token. Present on the create() result. |
data | dict | The full object: viewport, tier, end_reason, recording_status, recording_url and the rest. |
connect(*, timeout=60.0) | Computer | Open the control socket. Raises HalyardError when there is no control URL; get a fresh one with create(). |
refresh() | ComputerSession | Re-read it so status and data are current. |
stop() | None | End the computer. |
Computer.connect()
Open a computer’s control socket directly and perform the DCP handshake.
| Parameter | Type | Default | Description |
|---|---|---|---|
control_url | str | None | HALYARD_CONTROL_URL | The computer’s control URL. Raises ValueError when neither is set. |
timeout | float | 60.0 | Seconds to wait for any one reply. |
client | str | None | None | A short lowercase name for an extra connection beside the main one, as on a browser. |
Computer.
Raises NotConnectedError when the socket can’t open, for any reason: a
refused or expired token, an ended computer, or a network failure. The message
says which. TimeoutError when the handshake gets no reply within timeout.
What a computer can do
Commands run as the session’s user, who has administrator rights: the machine is yours alone for the session and is reset after it ends.- Everything under
C:\axbelongs to the session’s own software and is read-only, exceptC:\ax\downloads. - Windows’ own processes and the session’s agent and streamer can’t be ended.
- A file transfer is at most 32 MiB each way.
processes.run()keeps the first 1 MiB of each output stream.- Every timeout on a computer is in milliseconds.