Skip to content
DocsTry Aspire
DocsTry

PythonAppResource.withVirtualEnvironment

Method
📦 Aspire.Hosting.Python v13.4.0
interface PythonAppResource {
// ... omitted for brevity
withVirtualEnvironment(
virtualEnvironmentPath: string,
createIfNotExists?: boolean): PythonAppResource;
}

Signature

methodwithVirtualEnvironmentbuilder
Configures a custom virtual environment path for the Python application.
withVirtualEnvironment(
virtualEnvironmentPath: string,
createIfNotExists?: boolean): PythonAppResource
virtualEnvironmentPathstring
createIfNotExistsbooleanoptional= True
PythonAppResource

Defined on

This method is defined on the following type: