Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddPythonExecutable

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

Signature

methodAddPythonExecutablebuilder
Adds a Python executable to the application model.
AddPythonExecutable(
name string,
appDirectory string,
executableName string,
) PythonAppResource
namestringThe name of the resource.
appDirectorystringThe path to the directory containing the python application.
executableNamestringThe name of the executable in the virtual environment (e.g., "pytest", "uvicorn", "flask").
PythonAppResource

The resource builder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder