Skip to content

A set of tools to keep your pinned Python dependencies fresh.

Notifications You must be signed in to change notification settings

Serenytics/pip-tools

This branch is 1693 commits behind jazzband/pip-tools:main.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 13, 2015
e71b072 · Dec 13, 2015
Apr 22, 2015
Jul 22, 2015
Dec 13, 2015
Nov 23, 2015
Oct 21, 2015
Nov 5, 2015
Dec 13, 2015
Jul 20, 2015
Nov 4, 2015
Jan 3, 2014
Dec 13, 2015
Oct 8, 2015

Repository files navigation

Build status

pip-tools = pip-compile + pip-sync

A set of command line tools to help you keep your pip-based packages fresh, even when you've pinned them. You do pin them, right?

pip-tools overview for phase II

Installation

$ pip install --upgrade pip  # pip-tools needs pip==6.1 or higher (!)
$ pip install pip-tools

Example usage for pip-compile

Suppose you have a Flask project, and want to pin it for production. Write the following line to a file:

# requirements.in
Flask

Now, run pip-compile requirements.in:

$ pip-compile requirements.in
#
# This file is autogenerated by pip-compile
# Make changes in requirements.in, then run this to update:
#
#    pip-compile requirements.in
#
flask==0.10.1
itsdangerous==0.24        # via flask
jinja2==2.7.3             # via flask
markupsafe==0.23          # via jinja2
werkzeug==0.10.4          # via flask

And it will produce your requirements.txt, with all the Flask dependencies (and all underlying dependencies) pinned. Put this file under version control as well and periodically re-run pip-compile to update the packages.

Example usage for pip-sync

Now that you have a requirements.txt, you can use pip-sync to update your virtual env to reflect exactly what's in there. Note: this will install/upgrade/uninstall everything necessary to match the requirements.txt contents.

$ pip-sync
Uninstalling flake8-2.4.1:
  Successfully uninstalled flake8-2.4.1
Collecting click==4.1
  Downloading click-4.1-py2.py3-none-any.whl (62kB)
    100% |████████████████████████████████| 65kB 1.8MB/s
  Found existing installation: click 4.0
    Uninstalling click-4.0:
      Successfully uninstalled click-4.0
Successfully installed click-4.1

About

A set of tools to keep your pinned Python dependencies fresh.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 99.4%
  • Makefile 0.6%