Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

A Python client for the tus resumable upload protocol ->

Project Description

# tus-py-client [![Build Status](](

> **tus** is a protocol based on HTTP for *resumable file uploads*. Resumable
> means that an upload can be interrupted at any moment and can be resumed without
> re-uploading the previous data again. An interruption may happen willingly, if
> the user wants to pause, or by accident in case of a network issue or server
> outage.

**tus-py-client** is a Python client for uploading files using the *tus* protocol to any remote server supporting it.

## Documentation

See documentation here:

## Get started

pip install tuspy

Now you are ready to use the api.

``` python
from tusclient import client

# Set Authorization headers if it is required
# by the tus server.
my_client = client.TusClient('',
headers={'Authorization': 'Basic xxyyZZAAbbCC='})

# Set more headers.
my_client.set_headers({'HEADER_NAME': 'HEADER_VALUE'})

uploader = my_client.uploader('path/to/file.ext', chunk_size=200)

# A file stream may also be passed in place of a file path.
fs = open('path/to/file.ext')
uploader = my_client.uploader(file_stream=fs, chunk_size=200)

# Upload a chunk i.e 200 bytes.

# Uploads the entire file.
# This uploads chunk by chunk.

# you could increase the chunk size to reduce the
# number of upload_chunk cycles.
uploader.chunk_size = 800

# Continue uploading chunks till total chunks uploaded reaches 1000 bytes.

If the upload url is known and the client headers are not required, uploaders can also be used standalone.

``` python
from tusclient.uploader import Uploader

my_uploader = Uploader('path/to/file.ext',

## License


Release History

This version
History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


History Node


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
(8.5 kB) Copy SHA256 Hash SHA256
Source None Mar 19, 2018

Supported By

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 Google Google Cloud Servers