SDK Reference/Python
Connections
The API for sending events to a machine.
Connection APIs
Connections provide the interface for interacting with a machine. Always use the context manager pattern when working with connections:
Keyboard Control
Mouse Control
Screen Operations
Control Flow
These tools only apply to Remote machines.
Best Practices
- Always use the context manager pattern (
with machine.connect() as conn:
) to ensure proper connection handling. - Group related operations within a single connection for better performance.
- Use
yield_control()
andawait_control()
when you need human intervention during an automation sequence.