Skip to main content

Edits your requirements.txt by peep-hashing them

Project description

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.

Ode to Erik Rose

Just in case you didn’t know; 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.1
  • Works

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

peepin-0.2.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

peepin-0.2-py2-none-any.whl (5.8 kB view details)

Uploaded Python 2

File details

Details for the file peepin-0.2.tar.gz.

File metadata

  • Download URL: peepin-0.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for peepin-0.2.tar.gz
Algorithm Hash digest
SHA256 2637f5ed494a88f17550c922a78fe0bea0eeeec991a443a1f44d623a168523ae
MD5 def4892a5c9d94d6f68d7ff847d2c996
BLAKE2b-256 82a63780d7f2aa390c0efafd62d0dfe4857149fda923d50f4ed72276bae0acbb

See more details on using hashes here.

Provenance

File details

Details for the file peepin-0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for peepin-0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 c71025d86f895a75f8caf65ad25552ba45b710b3ae74d6566e06b984cffab4d9
MD5 a1c33dc304dbdb36955e6b7c1bddd87f
BLAKE2b-256 182c86dde27212f36408d47899ca552fc5bd19dd869e9f8ce8391fe9c21cec50

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page