Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

AddPythonModule

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

Signature

methodAddPythonModulebuilder
Adds a Python module to the application model.
AddPythonModule(
name string,
appDirectory string,
moduleName string,
) PythonAppResource
namestringThe name of the resource.
appDirectorystringThe path to the directory containing the python application.
moduleNamestringThe name of the Python module to run (e.g., "flask", "uvicorn").
PythonAppResource

The resource builder.

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

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder