withVirtualEnvironment
Method
interface PythonAppResource { // ... omitted for brevity withVirtualEnvironment( virtualEnvironmentPath: string, createIfNotExists?: boolean): PythonAppResource;}Signature
method
withVirtualEnvironment builderConfigures a custom virtual environment path for the Python application.
withVirtualEnvironment( virtualEnvironmentPath: string, createIfNotExists?: boolean): PythonAppResourceParameters
virtualEnvironmentPath stringThe path to the virtual environment. Can be absolute or relative to the app directory. When relative, it is resolved from the working directory of the Python application. Common values include ".venv", "venv", or "myenv".createIfNotExists booleanoptional= TrueWhether to automatically create the virtual environment if it doesn't exist. Defaults to `true`. Set to `false` to disable automatic venv creation (the venv must already exist).Returns
PythonAppResource Applies to
This method applies to the following types: