SDK Reference/Python
Machines
The API to manage your machines.
Machine Management
The machines
module provides methods to access both local and remote machines running Piglet.
Local Machine
To connect to a Piglet running on your local machine:
This connects to the Piglet server running on localhost (typically on port 3000).
Remote Machines
To connect to a remote machine that has been registered with Pig's control plane:
You'll need the machine ID, which you can find using the Pig CLI:
Working with Machines
Once you have a machine reference, you can create a connection to send commands:
Connections provide the interface for interacting with the machine, including keyboard input, mouse control, and screen capture.