Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

PythonAppResource.WithPip

Method
📦 Aspire.Hosting.Python v17.0.0
type PythonAppResource interface {
// ... omitted for brevity
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().

Defined on

This method is defined on the following type: