# pypa/pip-tools

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/pypa-pip-tools).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

8,003 stars · 686 forks · Python · BSD-3-Clause

## Links

- GitHub: https://github.com/pypa/pip-tools
- Homepage: https://pip-tools.pypa.io
- awesome-repositories: https://awesome-repositories.com/repository/pypa-pip-tools.md

## Topics

`hashes` `lockfile` `packaging` `pip` `pip-compile` `pip-tools` `python` `requirements` `setuptools`

## Description

pip-tools is a set of command-line tools that extend pip for managing the dependencies of pip-based Python environments. Its compiler resolves loosely specified requirements, from requirements files or project metadata, into a fully pinned requirements file with exact package versions, supporting extras, constraints and direct references. Its synchronizer then installs, upgrades and removes packages so a virtual environment matches that pinned file exactly.

Pinned output can include cryptographic hashes for package files, so installs can run in hash-checking mode and reject tampered or unexpected packages. Hashes already present in an existing output file are reused, which speeds up compilation. Because resolved dependencies can differ by operating system, Python version and implementation, pins can be generated separately for each environment, and one requirements layer can constrain another so production and development files stay compatible.

Day-to-day maintenance is covered by selective or full upgrades of pinned packages, a pre-commit hook that regenerates pinned files when the source files change, and a dry-run mode or confirmation prompt before the synchronizer changes an environment. Compilation can use a backtracking resolver, honor constraint files, include build-system requirements, warn about unsafe packages, and pass extra options such as index settings, certificates and cache directories through to pip. Defaults can be read from configuration files, and output can be written to a custom file or to standard output, with annotations and header lines adjustable.

## Tags

### Development Tools & Productivity

- [Requirements Compilers](https://awesome-repositories.com/f/development-tools-productivity/dependency-managers/python-package-managers/requirements-compilers.md) — Resolves loosely specified requirements from requirements files or project metadata into a fully pinned file, including extras and direct references. ([source](https://github.com/pypa/pip-tools#readme))
- [Environment Synchronizers](https://awesome-repositories.com/f/development-tools-productivity/environment-synchronizers.md) — Installs, upgrades and removes packages so a virtual environment exactly matches a pinned requirements file. ([source](https://github.com/pypa/pip-tools/blob/main/pyproject.toml))
- [Pip Requirements Managers](https://awesome-repositories.com/f/development-tools-productivity/pip-requirements-managers.md) — Extends pip with command-line tools that compile and maintain pinned requirements files and sync environments, including pre-commit hook integration. ([source](https://github.com/pypa/pip-tools/blob/main/README.md))
- [Automated Dependency Maintenance](https://awesome-repositories.com/f/development-tools-productivity/automated-dependency-maintenance.md) — Keeps pinned dependency files current through a pre-commit hook that regenerates them and through selective or full upgrades.
- [Dependency Lock Managers](https://awesome-repositories.com/f/development-tools-productivity/dependency-lock-managers.md) — Generates reproducible lock-style requirements files with optional hashes so Python installs are repeatable and protected against tampered packages.
- [Multi-Environment Composition](https://awesome-repositories.com/f/development-tools-productivity/environment-managers/multi-environment-composition.md) — Maintains separate but compatible pinned files for production, development, and different operating systems or Python versions using layered inputs and markers.
- [Layered Requirements Workflows](https://awesome-repositories.com/f/development-tools-productivity/layered-requirements-workflows.md) — Lets one requirements layer constrain another so production and development files built from separate inputs keep compatible package versions. ([source](https://github.com/pypa/pip-tools#readme))
- [Package Upgraders](https://awesome-repositories.com/f/development-tools-productivity/package-upgraders.md) — Upgrades all pinned packages or only chosen ones to the latest or a specified version, honoring accompanying version constraints. ([source](https://github.com/pypa/pip-tools/blob/main/CHANGELOG.md))
- [Pinned Dependency Upgrades](https://awesome-repositories.com/f/development-tools-productivity/pinned-dependency-upgrades.md) — Refreshes an existing pinned file to the latest allowed versions, for all packages or only chosen ones, under optional version constraints. ([source](https://github.com/pypa/pip-tools#readme))
- [Dependency Compilation Hooks](https://awesome-repositories.com/f/development-tools-productivity/pre-commit-hooks/dependency-compilation-hooks.md) — Provides a pre-commit hook that regenerates pinned requirements files automatically whenever the source dependency files change. ([source](https://github.com/pypa/pip-tools#readme))
- [Python Environment Managers](https://awesome-repositories.com/f/development-tools-productivity/python-environment-managers.md) — Generates pins separately for each operating system, Python version and implementation, since resolved dependencies can differ by environment markers. ([source](https://github.com/pypa/pip-tools/blob/main/README.md))

### DevOps & Infrastructure

- [Environment Synchronizers](https://awesome-repositories.com/f/devops-infrastructure/deployment-management-strategies/execution-platforms-and-targets/deployment-environments/python-environment-installations/environment-synchronizers.md) — Installs, upgrades and uninstalls packages so a virtual environment exactly matches a pinned requirements file, skipping requirements whose markers do not apply. ([source](https://github.com/pypa/pip-tools/blob/main/CHANGELOG.md))
- [Lock-File Pinning](https://awesome-repositories.com/f/devops-infrastructure/reproducible-environments/lock-file-pinning.md) — Turns loosely specified Python requirements into fully pinned files so every developer, server and build installs identical versions.
- [Exact Version Pinning](https://awesome-repositories.com/f/devops-infrastructure/version-upgrades/dependency-versioning/dependency-version-updates/exact-version-pinning.md) — Compiles loosely specified Python dependencies into a requirements file with exact package versions, optionally including cryptographic hashes.
- [Supply Chain Security](https://awesome-repositories.com/f/devops-infrastructure/supply-chain-security.md) — Records and enforces package file hashes so installs are checked against tampering and unexpected substitutions in the dependency chain.

### Part of an Awesome List

- [Virtual Environments](https://awesome-repositories.com/f/awesome-lists/devtools/virtual-environments.md) — Makes a Python virtual environment match a pinned requirements file by installing, upgrading and removing packages, with dry runs and confirmation.

### Programming Languages & Runtimes

- [Python Package Version Resolution](https://awesome-repositories.com/f/programming-languages-runtimes/python-package-version-resolution.md) — Restricts resolution using constraint files, command-line version requests and per-package upgrade options, excluding constraints that are not requirements. ([source](https://github.com/pypa/pip-tools/blob/main/CHANGELOG.md))

### Security & Cryptography

- [Hash-Pinned Requirements](https://awesome-repositories.com/f/security-cryptography/cryptographic-hash-generation/hash-pinned-requirements.md) — Records hashes for every available package file in the pinned output and reuses hashes from an existing output file to speed compilation. ([source](https://github.com/pypa/pip-tools/blob/main/CHANGELOG.md))
- [Cryptographic Hash Verifiers](https://awesome-repositories.com/f/security-cryptography/cryptographic-hash-verifiers.md) — Adds cryptographic hashes to compiled requirements so installs run in hash-checking mode and reject tampered or mismatched packages. ([source](https://github.com/pypa/pip-tools/blob/main/README.md))
