Skip to content

Modern Python Workflows with uv

Introduction

Chapter 03 introduces uv, Astral's Rust-based Python project and package manager, first released in 2024. Its project configuration centers on pyproject.toml, which records project metadata and dependencies, while its lockfile supports reproducible installs. The chapter covers scaffolding workspaces, building and publishing packages, managing and caching dependencies, using the cache in CI, and workflows for standalone scripts, environments, and command-line tools with uvx or uv pip.

Overview

Use the navigation on the left to move through the chapter's sections:

Section Summary Project Notebook
Section 01 Project scaffolding with uv - A New Hope for Bob
Section 02 Dependency management with uv - Bob Discovers the Force of uv
Section 03 Dependency caching with uv uv-cache-demo Bob Follows the Cache
Section 04 Using uv's cache in CI uv-cache.yml -
Section 05 Standalone environments and tools with uv - Modern Python with uv