Skip to main content

A script to help creating and maintaining frozen requirements for pip

Project description

A script to help creating and maintaining frozen requirements for pip, inspired by this Mozilla dev team blog post.

Frozen requirements contain the packages you specified, plus all their dependencies, with pinned versions.

For example if you have requirements.txt containing this:


The frozen version would be:

# This file has been automatically generated, DO NOT EDIT!

# Frozen requirements for "requirements.txt"


Then you can use the frozen requirements in your deployment scripts with pip install -r requirements-frozen.txt --no-deps, and enjoy consistent deployments even if some packages are updated on pypi.

freeze-requirements can also put the downloaded source packages in a pypi-like directory structure on your web server, so you can speed up your deployments with pip install -r requirements-frozen.txt --index-url, and also build wheels to speed up deployments even more.


Install from pypi:

$ pip install freeze-requirements

Or from source:

$ ./ install


Create a frozen versions of two requirements files (they will be named requirements-frozen.txt and requirements2-frozen.txt in this example, the -frozen suffix can be customized with --separate-requirements-suffix):

$ freeze-requirements freeze --separate-requirements requirements.txt requirements2.txt

Merge multiple requirements in a single file:

$ freeze-requirements freeze --merged-requirements requirements-merged.txt requirements.txt requirements2.txt

Use a cache to avoid reprocessing known requirements files:

$ freeze-requirements freeze --cache-dependencies requirements.txt

Put downloaded source packages and build wheels for them in a pypi-like directory structure:

$ freeze-requirements freeze --output-dir /path/to/my/pypi --build-wheels requirements.txt

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

freeze-requirements-0.4.1.tar.gz (6.9 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page