Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddPythonApp

Method
📦 Aspire.Hosting.Python v17.0.0
func (DistributedApplicationBuilder) AddPythonApp(
name string,
appDirectory string,
scriptPath string,
) PythonAppResource

Signature

methodAddPythonAppbuilder
Adds a Python application to the application model.
AddPythonApp(
name string,
appDirectory string,
scriptPath string,
) PythonAppResource
namestringThe name of the resource.
appDirectorystringThe path to the directory containing the python application.
scriptPathstringThe path to the script relative to the app directory to run.
PythonAppResource

The resource builder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder