Files
2025-10-27 15:38:00 +01:00
..
2025-10-27 15:38:00 +01:00
2025-10-27 15:38:00 +01:00

Automation1 Python API
=============================================

The Automation1 Python API comes as a Python package installable via pip, available for 32-bit and 64-bit Windows as well as 64-bit Linux.
An example project is installed in the C:\Program Files\Aerotech\Automation1-MDK\Examples\Python folder.

The auto-complete information on the Controller class, its properties, and its methods document much of the API and how to use it.
Make sure you have an editor with auto-complete capabilities to make full use of the self-documenting auto-complete information.

To use the Automation1 Python API on Windows:
-------------------------------------------------------------
  The Automation1 Python API requires Python 3.8.10 or newer with pip installed.

  1. Open a Windows Command Prompt.
  2. Run this command: pip install "C:\Program Files\Aerotech\Automation1-MDK\APIs\Python\automation1"
  3. The Automation1 Python API is now available for use in any Python file. Use "import automation1" to access the Automation1 Python API.
  4. Connect to the controller using the Controller.connect() method.
      * The auto-complete information on the Controller class, its properties, and its methods document much of the API and how to use it.
	  * If access control is enabled, use the static Controller.connect() method with the "username" and "password" keyword arguments. 
	  	* Example: my_controller= automation1.Controller.connect(username='MyUsername', password='MyPassword')
      * If the controller is installed on a different computer, use the static Controller.connect() method with the "host" keyword argument.
	    * Example: my_controller = automation1.Controller.connect(host='address')
      * Connecting to the controller does not automatically start the controller. To start the controller use the Controller.start() method.
      * You can connect to the same Automation1 controller multiple times (from the same process, different processes, or different PCs).

To use the Automation1 Python API on Linux:
-------------------------------------------------------------
  The Python API for Linux supports Debian 10.x. Any Linux distribution that has GCC 8.3.0, GLIBC 2.28, GLIBCXX 3.4.25, libsodium 1.0.17,
  or newer versions, may work.

  1. Copy the "automation1" folder from "C:\Program Files\Aerotech\Automation1-MDK\APIs\Python\automation1" to your Linux machine.
  2. Copy all shared object files from "C:\Program Files\Aerotech\Automation1-MDK\APIs\C\Library\Linux\x64" to your Linux machine.
  3. Configure the LD_LIBRARY_PATH environment variable to point to the folder with the shared object files from step 2.
  4. Open a new terminal in the folder from step 1 that contains the "automation1" folder. You should not be inside the "automation1" folder, 
  	 but instead in its parent folder.
  5. Run this command: pip install "./automation1"
  6. The Automation1 Python API is now available for use in any Python file. 
  	 Use "import automation1" to access the Automation1 Python API.
  7. Connect to the controller using the Controller.connect() method.
      * The auto-complete information on the Controller class, its properties, and its methods document much of the API and how to use it.
	  * If access control is enabled, use the static Controller.connect() method with the "username" and "password" keyword arguments. 
	  	* Example: my_controller = automation1.Controller.connect(username='MyUsername', password='MyPassword')
      * If the controller is installed on a different computer, use the static Controller.connect() method with the "host" keyword argument.
	    * Example: my_controller = automation1.Controller.connect(host='address')
      * Connecting to the controller does not automatically start the controller. To start the controller use the Controller.start() method.
      * You can connect to the same Automation1 controller multiple times (from the same process, different processes, or different PCs).