Skip to content
DocsTry Aspire
DocsTry

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

Applies to

This method applies to the following types: