withUv

Method
📦 Aspire.Hosting.Python v17.0.0
interface PythonAppResource {
// ... omitted for brevity
withUv(
install?: boolean,
args?: string[]): PythonAppResource;
}

Signature

methodwithUvbuilder
Adds a UV environment setup task to ensure the virtual environment exists before running the Python application.
withUv(
install?: boolean,
args?: string[]): PythonAppResource
installbooleanoptional= TrueWhen true (default), automatically runs uv sync before the application starts. When false, only sets the package manager annotation without creating an installer resource.
argsstring[]optionalOptional custom arguments to pass to the uv command. If not provided, defaults to ["sync"].
PythonAppResource

Applies to

This method applies to the following types: