Python API: A Command-line Tool for Creating and Managing Projects in Vitis - 2025.2 English - UG1400

Vitis Unified Software Platform Documentation: Embedded Software Development (UG1400)

Document ID
UG1400
Release Date
2025-11-20
Version
2025.2 English

The Vitis Unified IDE provides an intuitive graphical interface for assembling and managing your embedded software projects. With the Vitis Unified IDE, you can create and build all Vitis components, including Platforms, Applications, HLS Designs and AI Engines. Alternatively, the Python API offers a scriptable approach, enabling you to create and manage Vitis components programmatically.

Vitis CLI Commands

Important: You can find all the Vitis CLI command details in the installation folder: <Vitis_install>2025.2/Vitis/cli/api_docs/build/html/vitis.html

Executing Python APIs

To execute Python APIs, first establish the connection between the server and the client. You can execute Python APIs in command line mode or as a Python script. The AMD Vitis™ Unified IDE supports two ways to run Python APIs:

  1. Run Python API in CLI (Command-Line Interface) mode: Executing the Python API in CLI mode is supported in interactive mode only. For more details, see Vitis Interactive Python Shell in the Vitis Reference Guide (UG1702).
    vitis -i (This opens the Vitis interactive shell)
  2. Run Python API in a Python Script. The Vitis Unified IDE supports executing Python script in batch mode and in interactive mode.

    In batch mode:

    In batch mode:
    $ vitis -s <.py>
    In Interactive mode:
    $ vitis -i
    (This openes the Python interactive shell)
    vitis [1]: run <.py>
    Some Python APIs are helpful in managing client life cycles, create Vitis workspaces and manage Vitis project flows. Refer the Vitis API CLI documentation for more details.
    Table 1. Python APIs: Manage Client
    Python API Description Example
    create_client Creates a client instance. client=vitis.create.client()
    dispose Closes all client connections and terminates the connection to the server. client.dispose()
    exit Closes the session. exit()
    After creating and building the components and system project, you can open the workspace using the command below:
    vitis -w <workspace_path>

    If you built or created components through Python APIs, these components exhibit status done when you open them.

All Python APIs Supported by Vitis

Important: For more details on all the Python APIs supported by Vitis, refer to <vitis_installation_path>/cli/api_docs/build/html/vitis.html
Figure 1. Python APIs Supported by Vitis Documentation

Python examples are in <vitis_installation_path>/cli/examples