This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

tus python integration

This package aims to be a robust implementation of the tus resumable upload standard,

Integrations include an api to handle WebOb requests and Zope2 requests. Additionally, you can run this server as a wsgi filter.

The package aims to be everything you need to integrate the TUS protocol into your python web applications.


directory to store temporary files
by default, it’ll only send the filename in the request body, not an actual file upload
how long before you cleanup old uploads in seconds
only used for WSGI filter


  1. POST to url, response 201 with location of temp file upload url. The upload url is a combination of the base url + the unique id of the in progress file upload. Example: /upload/432jjdsfjsd78387
  2. PATCH to temp file upload url responded to in previous POST. These can be chunks of the entire file.


  • HEAD to issued temp file upload url to give current size of uploaded


WebOb compatible applications

A simple Webob request adapter is provided to work with the API. This code assume it will be handling all upload related requests–meaning:

from tus import Tus, WebobAdapter
adapter = WebobAdapter(req)
options = {
    'tmp_file_dir': '/tmp'
tus = Tus(adapter, **options)
if tus.valid:
    if tus.upload_finished:
        fipath = tus.get_filepath()
        # do something here
        return adapter.resp

Zope2 or Plone

This example is taken out of

adapter = Zope2RequestAdapter(req)
tus = Tus(adapter, **tus_settings)
if tus.valid:
    if not tus.upload_finished:
        filename = req.getHeader('FILENAME')
        if tus.send_file:
            filedata = req._file
            filepath =
            filedata = open(filepath)

WSGI Filter

Example in python:

from tus import Filter as TusFilter
filtered = TusFilter(app, tmp_file_dir='/tmp', upload_path='/upload')

WSGI Paste Configuration Example

Basic paste deploy config:

use = egg:MyEgg
filter-with = tus

use = egg:tus#main
upload_path = /upload
tmp_file_dir = /tmp


use = egg:tus#main
upload_path = /upload
tmp_file_dir = /tmp

pipeline =


  • Initial version
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

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date (17.7 kB) Copy SHA256 Checksum SHA256 Source Jan 22, 2014

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