PythonAppResource.WithVirtualEnvironment
Method
type PythonAppResource interface { // ... omitted for brevity WithVirtualEnvironment( virtualEnvironmentPath string, options ...*WithVirtualEnvironmentOptions, ) PythonAppResource}Signature
method
WithVirtualEnvironment builderConfigures a custom virtual environment path for the Python application.
WithVirtualEnvironment( virtualEnvironmentPath string, options ...*WithVirtualEnvironmentOptions,) 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".options...*WithVirtualEnvironmentOptions Optional settings, described under Options.Options
Optional parameters are passed in a trailing options ...*WithVirtualEnvironmentOptions argument.
CreateIfNotExists *boolWhether 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 The resource builder.
Returns a handle; failures surface later via Err().
Defined on
This method is defined on the following type: