This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Help us improve Python packaging - Donate today!
Project Description

ReGet: retransmit less

Inspired by lack of functionality of wget this tool solves two annoying issues

  • wget -N -O somefile doesn’t work as you may expect
  • there is no way to atomically replace target file with updated version

Okay, second problem easily solved like this


TMPFILE=$(mktemp -q)

(wget -qO "$TMPFILE" "$1" && mv "$TMPFILE" "$2") || rm "$TMPFILE"

But what about first issue? It needs much more complicated shell-magic, introduces more troubles and requires additional HTTP request to target server.


  • Built on top of requests.
  • Keep response metadata for next run.
  • Send only needed headers from previous run.
  • Atomic update of destination file.


$ pip install reget


As console tool:

$ reget /tmp/example

will download server response to /tmp/example and create /tmp/example.json with headers needed for next run.

As python package

>>> import reget
>>> reget.get('', '/tmp/example')
<Response [200]>
>>> reget.get('', '/tmp/example')
<Response [304]>

Note that subsequent calls with the same url save_path arguments will respect 304 Not Modified.

Known issues

  • Noticable startup time


  • Option to use single directory for response metadata.
  • Accept multiple <url> <save_path> from file/stdin.
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
reget-0.5-py2.py3-none-any.whl (5.8 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 20, 2015
reget-0.5.tar.gz (3.4 kB) Copy SHA256 Checksum SHA256 Source Jul 20, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting