Skip to content

Instantly share code, notes, and snippets.

@James-Leslie
Created May 5, 2025 21:48
Show Gist options
  • Save James-Leslie/445d229923fd3e4d6a852aef100fdec0 to your computer and use it in GitHub Desktop.
Save James-Leslie/445d229923fd3e4d6a852aef100fdec0 to your computer and use it in GitHub Desktop.
UV project files

Common commands

1. Build environment on new machine

uv sync

2. Add dependencies

uv add <package-name>

2.1. Add dev dependencies (only required on your current machine)

uv add --dev <package-name>
[project]
name = "example-project"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
]
[dependency-groups]
dev = [
"ipykernel==6.23.3",
"ipython>=8.12,<8.13",
"ipywidgets",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/example_pkg"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment