Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

WithPip

Method
📦 Aspire.Hosting.Python v17.0.0
func (PythonAppResource) WithPip(options ...*WithPipOptions) PythonAppResource

Signature

methodWithPipbuilder
Configures the Python resource to use pip as the package manager and optionally installs packages before the application starts.
WithPip(options ...*WithPipOptions) PythonAppResource
options...*WithPipOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*WithPipOptions argument.

Install*boolWhen true (default), automatically installs packages before the application starts. When false, only sets the package manager annotation without creating an installer resource.
InstallArgs[]stringThe command-line arguments passed to pip install command.
PythonAppResource

The resource builder.

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

Applies to

This method applies to the following types: