pip-compile-multi

3.3.0 · active · verified Thu Apr 16

pip-compile-multi is a command-line utility for compiling multiple Python `requirements.in` files into locked `requirements.txt` files. It builds upon `pip-tools` (or `uv`) to manage complex dependency graphs, resolve cross-file conflicts, and ensure deterministic, reproducible environments across different project stages like development, testing, and production. The library is actively maintained, with recent updates, and is currently at version 3.3.0.

Common errors

Warnings

Install

Quickstart

This quickstart demonstrates how to set up two common dependency sets: `base` for runtime requirements and `test` for testing, which includes the `base` requirements. It shows how to generate the locked `.txt` files and install them.

# 1. Create a directory for your requirement files
mkdir requirements

# 2. Define your base dependencies in requirements/base.in
# requirements/base.in
# click
# pip-tools

# 3. Define your test dependencies in requirements/test.in
# Include base dependencies using -r
# requirements/test.in
# -r base.in
# pytest

# 4. Run pip-compile-multi to generate locked .txt files
pip-compile-multi

# 5. Install your dependencies using the generated .txt files
pip install -r requirements/base.txt -r requirements/test.txt

view raw JSON →