After a platform has been created, the Vitis tool's Python API can be used to create an application component. The API also supports creating an application from an example template or an empty application with imported source code.
| Python API | Description | Python API Example |
|---|---|---|
| create_app_component | Create an application component. | app_comp = client.create_app_component(name = <comp_name>, platform = <platform>, domain = <domain>, template = <template>, cpu = <cpu>, os = <os>, sysroot_toolchain = <sysroot_path>, use_sysroot_toolchain = <boolean>) |
| import_files | Import files to the app component | status = app_comp.import_files(from_loc = <Location of src or config file(s) path>, files = ["file1",..]**, files_to_exclude = ["file1",..]**, dest_dir_in_cmp = <Dest location or config file(s) path>, is_skip_copy_sources = False) |
| build | Generate the application. | app_comp.build() |
The following is an example of a Python script being used to create an
application with the 'Hello World'
template.
import vitis
client = vitis.create_client()
client.set_workspace(path="vitis_2025.2_ws")
comp = client.create_app_component(name="hello_world",platform = "/vitis_2025.2_ws/platform/export/platform/platform.xpfm",domain = "standalone_psu_cortexa53_0",template = "hello_world")
comp = client.get_component(name="hello_world")
comp.build()