Skip to main content
CI Workflow pre-commit black Latest Version Python versions BSD License Documentation

tus.io server implementation for aiohttp.web applications.

For uploading large files, please consider using aiotus (Python 3.7+) library instead.

  • Works on Python 3.6+

  • Works with aiohttp 3.5+

  • BSD licensed

  • Latest documentation on Read The Docs

  • Source, issues, and pull requests on GitHub

Quickstart

Code belows shows how to enable tus-compatible uploads on /uploads URL for aiohttp.web application. After upload, files will be available at ../uploads directory.

from pathlib import Path

from aiohttp import web
from aiohttp_tus import setup_tus


app = setup_tus(
    web.Application(),
    upload_url="/uploads",
    upload_path=Path(__file__).parent.parent / "uploads",
)

Chunk Size

Please, make sure to configure client_max_size for aiohttp.web Application and supply proper chunkSize for Uppy.io or other tus.io client.

Documentation

CORS Headers

To setup CORS headers you need to use cors_middleware from aiohttp-middlewares package. aiohttp-cors library not supported cause of aio-libs/aiohttp-cors#241 issue.

Documentation

Reverse proxy and HTTPS

When aiohttp application deployed under the reverse proxy (such as nginx) with HTTPS support, it is needed to use https_middleware from aiohttp-middlewares package to ensure that web.Request instance has proper schema.

Documentation

Examples

examples/ directory contains several examples, which illustrate how to use aiohttp-tus with some tus.io clients, such as tus.py and Uppy.io.

Metadata

Release files for aiohttp-tus 1.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiohttp-tus 1.1.0
File Size Uploaded Provenance Actions
aiohttp-tus-1.1.0.tar.gz 11.6 kB Without provenance Details for aiohttp-tus-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiohttp-tus 1.1.0
File Interpreter ABI Platform Actions
aiohttp_tus-1.1.0-py3-none-any.whl Python 3 none any Details for aiohttp_tus-1.1.0-py3-none-any.whl

Total release size: 23.8 kB

Release files / aiohttp-tus-1.1.0.tar.gz

Download URL aiohttp-tus-1.1.0.tar.gz
Size 11.6 kB
Tags Source
SHA-256 checksum
How to use checksums
acc2196c1046c5aeb73904734e87ba944ed18c4c376d710d1d039606e35cfbc9
BLAKE2b-256 checksum
How to use checksums
bc1d3029a6a9ff5701ff6b8fe070502a69bf1f75ea3350115837fde712e9d679
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.1.0

Release files / aiohttp_tus-1.1.0-py3-none-any.whl

Download URL aiohttp_tus-1.1.0-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83457ec3a0d455a0c83b771b0de317d146dfe66e3e91ad2da9834aba283f200c
BLAKE2b-256 checksum
How to use checksums
a078a22624c1656b3eb2c863a41c9d757f0fdf7e63382d7c68d4d4b56b826f2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.12 CPython/3.10.1 Darwin/21.1.0

Security for aiohttp-tus 1.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page