Skip to main content

Asynchronous tus (tus.io) client library

Project description

aiotus - Asynchronous tus client library

aiotus implements the client-side of the tus protocol.

Features

  • Implements the core protocol as well as the creation and concatenation extensions.
  • Built-in retry support in case of communication errors.
  • Extensive test bench, including tests against the reference tusd server.

Usage

import aiotus

creation_url = "http://example.com/files"

metadata = {
    "Filename": "image.jpeg".encode(),
    "Content-Type": "image/jpeg".encode()
}

# Upload a file to a tus server.
with open("image.jpeg", "rb") as f:
    location = await aiotus.upload(creation_url, f, metadata)
    # 'location' is the URL where the file was uploaded to.

# Read back the metadata from the server.
metadata = aiotus.metadata(location)

Requirements

Installation

Install aiotus from PyPi:

pip install aiotus

Development versions can be installed from TestPyPi:

pip install --index-url https://test.pypi.org/simple --extra-index-url https://pypi.org/simple aiotus

Documentation

The documentation can be found at aiotus.readthedocs.io.

License

aiotus is licensed under the Apache 2.0 license.

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

aiotus-0.1.11.tar.gz (27.5 kB view hashes)

Uploaded source

Built Distribution

aiotus-0.1.11-py3-none-any.whl (15.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page