Skip to main content
======
Peepin
======

.. image:: https://travis-ci.org/peterbe/peepin.svg?branch=master
:target: https://travis-ci.org/peterbe/peepin

This tool makes it easier to update your strict "peep-ready"
``requirements.txt`` file.

If you want to add a package or edit the version of one you're currently
using you have to do the following steps:

1. Go to pypi for that package
2. Download the .tgz file
3. Possibly download the .whl file
4. Run `peep hash downloadedpackage-1.2.3.tgz`
5. Run `peep hash downloadedpackage-1.2.3.whl`
6. Edit requirements.txt

This script does all those things.
Hackishly wonderfully so.

A Word of Warning!
==================

The whole point of peep is that you vet the packages that you use
on your laptop and that they haven't been tampered with. Then you
can confidently install them on a server.

This tool downloads from PyPI (over HTTPS) and runs ``peep hash``
on the downloaded files.

You still need to check that the packages that are downloaded
are sane.

You might not have time to go through the lines one by one
but you should be aware that the vetting process is your
responsibility.

Installation
============

This is something you only do or ever need in a development
environment. Ie. your laptop::

pip install peepin

How to use it
=============

Suppose you want to install ``futures``. You can either do this::

peepin futures

Which will download the latest version tarball (and wheel) and
calculate their peep hash and edit your ``requirements.txt`` file.

Or you can be specific about exactly which version you want::

peepin "futures==2.1.3"

Suppose you don't have a ``requirements.txt`` right there in the same
directory you can do this::

peepin "futures==2.1.3" stuff/requirementst/prod.txt

If there's not output. It worked. Check how it edited your
requirements files.

Runnings tests
==============

Simply run:

python setup.py test


Debugging
=========

To avoid having to install `peepin` just to test it or debug a feature
you can simply just run it like this:

touch /tmp/whatever.txt
python peepin.py --verbose Django /tmp/whatever.txt


Ode to Erik Rose
================

Just in case you didn't know;
`peep <https://github.com/erikrose/peep>`_ is awesome.
It makes it possible to confidently leave
third-party packages to be installed on the server without needing to
be checked into some sort of "vendor" directory.

Having said that, if you don't care about security or repeatability.
Then Erik is just a dude with a goatee.

Version History
===============

0.13
* Important bug fix that prevented you from installing specific
version. Thanks @pmclanahan

0.12
* Started using the JSON interface of pypi instead of scraping the
HTML.

0.11
* Bugfix so that it doesn't just insert the new SHAs but also the new
package name and version.

* Replaced all HTTP mocking done by `httpretty` with regular `mock`.

0.10
* If you had lines like `http://github.com/some.zip#egg=package` in
the requirements the editing of lines got confused.

0.9
* setup.py installs argparse if you're on python 2.6

0.8
* Avoid editing the requirements file if no packages are found, fixed #3

0.7
* Ability to download binary URLs

0.6
* Works in python 2.6, 2.7, 3.3 and 3.4

0.5
* Fix for multi-version packages like Django

0.4
* Be verbose about downloaded files

0.3
* Regression

0.2
* --verbose option

0.1
* Works

Metadata

Release files for peepin 0.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peepin 0.13
File Size Uploaded
peepin-0.13.tar.gz 5.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for peepin 0.13
File Interpreter ABI Platform
peepin-0.13-py3-none-any.whl Python 3 none any Details
peepin-0.13-py2-none-any.whl Python 2 none any Details

Total release size: 20.5 kB

Release files / peepin-0.13.tar.gz

Download URL peepin-0.13.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bada62079c5598e3921beb44eea7e4634c781407753c5afbd2c586f1a7acf5a0
BLAKE2b-256 checksum
How to use checksums
9ce7dcf27898e8b5a0a378cf1a6689819e23cb2d8d379c1d49959d169776b141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / peepin-0.13-py3-none-any.whl

Download URL peepin-0.13-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
771220913ecfeca8ea0b6f08eb2c53e682b66fc99981d2fec7654650a94df827
BLAKE2b-256 checksum
How to use checksums
87e01e95ff1c7aa799c22052d9e5f09b6220ccc99a2eb491f14c856c52bf7787
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / peepin-0.13-py2-none-any.whl

Download URL peepin-0.13-py2-none-any.whl
Size 7.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
3260081f4be51185efe7131ab68a5978faaeb55855b26c588e417a6ec32ea661
BLAKE2b-256 checksum
How to use checksums
9f1a4a1129a5342c120997cff15505fcc8fea5183228bf847b1397ec10c3acdc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.14

2 release files

This release

0.13 This release

3 release files

0.12

3 release files

0.11

3 release files

0.10

3 release files

0.9

3 release files

0.8

3 release files

0.7

3 release files

0.6

3 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page