uv Simple Project Generator
A VS Code extension that creates and runs simple Python projects managed with
uv. It follows the same workflow as
processing-py Project Generator, but generates a
plain, dependency-free project.
Requirements
This extension needs uv, which installs Python and the project's
packages. Install it with the official script:
For other methods (Homebrew, WinGet, pip, ...), see the
uv installation page.
Restart VS Code after installing uv so it can be found.
Installation
Install from the Visual Studio Marketplace:
- In VS Code, open the Extensions view (
Cmd+Shift+X / Ctrl+Shift+X), search for
uv Simple Project Generator, and click Install, or
- run
code --install-extension tadokoro.uv-simple-generator.
A .vsix file is also attached to each GitHub release;
install it with Extensions: Install from VSIX... in the Command Palette.
Then install uv (see Requirements) and run uv: Create a new uv Project from the Command Palette.
Features
- uv: Create a new uv Project (Command Palette)
- Project name
- Template: Blank (default) or Data Science
- Parent folder
- Runs
uv sync to install Python and dependencies into .venv
(automatic by default; see uvSimple.syncAfterCreate)
- Opens the project in this window or a new one and shows
main.py
- Create uv Project Here: right-click a folder in the Explorer
(asks only for the project name and template).
- uv: Run with uv (▶ in the editor title bar,
Cmd+R / Ctrl+R):
runs uv run <file> in a dedicated terminal. Running again restarts the program.
- uv: Stop: closes the run terminal.
- uv: Add Package (uv add) (Command Palette, or right-click
pyproject.toml in the Explorer):
enter one or more package names separated by spaces (version specifiers such as
requests>=2.31 and extras such as requests[socks] are allowed), and the extension runs
uv add in the project. The project is the one containing the active file; if that cannot be
determined, the pyproject.toml in the workspace is used (you are asked to choose if there are several).
Output is written to the uv Simple Project Generator output channel.
Templates
Blank (default)
No dependencies. main.py:
def main() -> None:
"""Main entry point."""
print("Hello, World!")
if __name__ == "__main__":
main()
Data Science
pyproject.toml lists NumPy, pandas, Matplotlib, Seaborn and scikit-learn, and main.py
draws a simple scatter plot:
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
def main() -> None:
"""Main entry point."""
rng = np.random.default_rng(seed=0)
x = rng.normal(size=100)
df = pd.DataFrame({"x": x, "y": 2 * x + rng.normal(size=100)})
sns.scatterplot(data=df, x="x", y="y")
plt.title("Scatter Plot")
plt.show()
if __name__ == "__main__":
main()
Generated project
my-project/
├── main.py # entry point (from the chosen template)
├── pyproject.toml # dependencies (from the chosen template)
├── .python-version # 3.14 (configurable)
├── README.md
├── .gitignore
└── .vscode/
├── settings.json # interpreter = .venv
├── launch.json # debugpy: run main.py / current file
└── extensions.json # recommends ms-python.python
Add dependencies with uv: Add Package (uv add) or uv add <package> in a terminal.
Settings
| Setting |
Default |
Description |
uvSimple.uvPath |
uv |
Path to uv. If set to uv, ~/.local/bin, ~/.cargo/bin and Homebrew locations are also tried. |
uvSimple.pythonVersion |
3.14 |
Written to .python-version; also sets requires-python. |
uvSimple.syncAfterCreate |
always |
always runs uv sync after creation, ask asks first, never leaves it to you (run uv sync in the project folder). |
Development
npm install
npm test # compile + unit tests (node:test)
Press F5 in VS Code to launch an Extension Development Host. Package with npx @vscode/vsce package.