Installation
uv:
Quick Start
Configuration
execute() method always uses a 120-second timeout, regardless of the client timeout.
Context Manager
The client supportswith to automatically close the underlying HTTP connection:
Method Reference
Desktop CRUD
| Method | Returns | Description |
|---|---|---|
create_desktop(desktop_type="sandbox") | Desktop | Create a new desktop |
list_desktops() | list[Desktop] | List all active desktops |
get_desktop(desktop_id) | Desktop | Get a single desktop by ID |
update_desktop(desktop_id, *, name) | Desktop | Rename a desktop |
delete_desktop(desktop_id) | DeleteResponse | Delete a desktop |
Computer-Use Helpers
Typed shortcuts — no need to know the wire format:| Method | Description |
|---|---|
screenshot(desktop_id) | Take a screenshot |
left_click(desktop_id, x, y) | Left click at coordinate |
right_click(desktop_id, x, y) | Right click at coordinate |
double_click(desktop_id, x, y) | Double click at coordinate |
middle_click(desktop_id, x, y) | Middle click at coordinate |
mouse_move(desktop_id, x, y) | Move cursor to coordinate |
type_text(desktop_id, text) | Type text |
key_press(desktop_id, key) | Press a key or combo (e.g. "ctrl+a") |
scroll(desktop_id, x, y, *, direction, amount=3) | Scroll at coordinate |
cursor_position(desktop_id) | Get current cursor position |
Tool Execution
| Method | Returns | Description |
|---|---|---|
execute(desktop_id, *, tool, action, params=None) | ExecuteResult | Execute any tool action (raw) |
list_tools(desktop_id) | list[ToolSchema] | List available tools as JSON Schema |
get_tool_logs(desktop_id) | list[dict] | Get tool execution logs |
Sessions
| Method | Returns | Description |
|---|---|---|
create_session(desktop_id) | SessionInfo | Create or reconnect an RDP session |
get_session(desktop_id) | SessionInfo | Get current session status |
delete_session(desktop_id) | None | Disconnect the session |
Error Handling
All API errors raise a subclass ofNenDesktopError, which carries status_code and response_body:
| Exception | Status |
|---|---|
AuthenticationError | 401 |
NotFoundError | 404 |
ConflictError | 409 |
ServerError | 5xx |
NenDesktopError | any other ≥ 400 |