Open-Source Wikis

/

uv

/

Crates

/

uv-requirements

astral-sh/uv

uv-requirements

crates/uv-requirements/ builds the resolver's input. Given a project, a set of requirements.txt files, CLI requirements, constraints, overrides, and groups, it produces the unified collection of Requirements the resolver actually solves.

Purpose

Resolver input is surprisingly tangled:

  • A project has dependencies, optional-dependencies, and dependency-groups.
  • The user can pass --with, --with-requirements, --constraint, --override, --extra, --group.
  • A requirements.txt can -r other files and -c constraint files.
  • Sources from [tool.uv.sources] rewrite where a requirement comes from.

This crate composes all of those into a clean input.

Key abstractions

  • RequirementsSpecification — the aggregated input.
  • RequirementsSource — discriminator: project, file, CLI, named requirement.
  • Helpers for --with-requirements flattening.

See also

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

uv-requirements – uv wiki | Factory