Skip to main content
Help us improve Python packaging – donate today!

python wsgi filter for tus protocol 1.0.0

Project Description

python wsgi filter for tus protocol 1.0.0, the tus resumable upload standard.

install

pip install tusfilter

Arguments

app
required, the wsgi server application
upload_path
str, required, path of the upload service
tmp_dir
str, optional, directory to store temporary files, default /upload
expire
int, optional, how long before cleanup old uploads in seconds, default 60*60*60
send_file
bool, optional, False for send the absolute filepath in tmp_dir in the request body, True for an actual file uploaded, default False
max_size
int, optional, maximum size of uploads in bytes, default 2**30, 1G

Example

flask

from tusfilter import TusFilter
from flask import Flask

app = Flask(__name__)

@app.route("/upload_resumable/<tmpfile>", methods=['PATCH'])
def upload_resumable(tmpfile):
    # do something else
    return 'End of upload'

app.wsgi_app = TusFilter(
    app.wsgi_app,
    upload_path='/upload_resumable',
    tmp_dir='/tmp/upload',
)

Release history Release notifications

This version
History Node

0.5.1

History Node

0.5.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
tusfilter-0.5.1-py2.py3-none-any.whl (7.3 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Nov 2, 2015

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page