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 = await 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-1.0.0.tar.gz (30.2 kB view details)

Uploaded Source

Built Distribution

aiotus-1.0.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

Details for the file aiotus-1.0.0.tar.gz.

File metadata

  • Download URL: aiotus-1.0.0.tar.gz
  • Upload date:
  • Size: 30.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.10

File hashes

Hashes for aiotus-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2d15f5132fe5752cb5b857bdcb8f7dd83eba8c367bb5625c951076555f338023
MD5 d0365bd9478fa7edb49727a6c950d0dd
BLAKE2b-256 d117113ee34db1caeca2738f037a5bf28d9880374242d0f0c4ea631c1e42f074

See more details on using hashes here.

File details

Details for the file aiotus-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aiotus-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.10

File hashes

Hashes for aiotus-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7d22b18550ccb824da11a5f4b0e400c9a253e5a6ce455e59d102f4786c7a7515
MD5 069438b9d6deb91c618dddb9a4b5688b
BLAKE2b-256 d6859b98352b613bfc1d8e4b4c0d1b5617838a7a76eb58257d64a40028e960ef

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page