Skip to content

Allow using uv venv with --format=json #5279

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
InSyncWithFoo opened this issue Jul 22, 2024 · 0 comments
Open

Allow using uv venv with --format=json #5279

InSyncWithFoo opened this issue Jul 22, 2024 · 0 comments
Labels
cli Related to the command line interface enhancement New feature or improvement to existing functionality

Comments

@InSyncWithFoo
Copy link
Contributor

InSyncWithFoo commented Jul 22, 2024

This is what uv venv currently outputs on Windows:

Using Python 3.12.4 interpreter at: ...\python.exe
Creating virtualenv at: .venv
Activate with: .venv\Scripts\activate

It is good for human consumption, but not so much for machines. I propose that uv venv outputs a JSON object in the following format when used with --format=json:

interface VenvOutput {
  python: string;
  venv: string;
  activateCommand: string;
}

Example output:

{
  "python": "...\\python.exe",
  "venv": ".venv",
  "activateCommand": ".venv\\Scripts\\activate"
}

This is a subtask of #3199.

@charliermarsh charliermarsh added enhancement New feature or improvement to existing functionality cli Related to the command line interface labels Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface enhancement New feature or improvement to existing functionality
Projects
None yet
Development

No branches or pull requests

2 participants