Skip to content

.WithUvEnvironment in the Python extensions doesn't expose a way to add additional arguments #12294

Closed

Description

Is there an existing issue for this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe the problem.

I have a Python project which has both required dependencies and optional dependencies.

[project]
name = "my-demo"
version = "0.1.0"
description = "Agent implementations for the shop application"
requires-python = ">=3.12"
dependencies = [
"fastapi[standard]"
]

[project.optional-dependencies]
test = [
"pytest",
]

.WithUvEnvironment doesn't provide any parameters or overrides to add additional command line flags. Any .WithArgs methods would override the Python start command, not the uv sync command.

Describe the solution you'd like

I would like the ability to include certain command line flags on the uv sync command generated by .WithUvEnvironment.

For example:

  • uv sync --extra test to include the test dependencies
  • uv sync --all-extras to include all extras
  • uv sync --group <group> to include a specific group
  • uv sync --no-group <group> to exclude a specific group
  • uv sync --index to use a different PyPi index (like the PyTorch one)

Please add the ability to add extra runtime flags for uv sync.

Additional context

No response

Activity

  1. added this to the 13.0 milestone on Oct 23, 2025
  2. davidfowl commented on Nov 4, 2025

    @davidfowl
    Collaborator

    Eric Erhardt (@eerhardt) should we follow the JavaScript pattern here? We change WithUvEnvironment to WithUv and we allow passing arguments.

  3. eerhardt commented on Nov 4, 2025

    @eerhardt
    Member

    @eerhardt should we follow the JavaScript pattern here? We change WithUvEnvironment to WithUv and we allow passing arguments.

    That seems reasonable to me.

  4. davidfowl commented on Nov 5, 2025

    @davidfowl
    Collaborator

    Fixed in #12667

  5. locked and limited conversation to collaborators on Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-integrationsIssues pertaining to Aspire Integrations packagespython

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions