skillfed

tuspyserver

A Python tus server implementation as a FastAPI router

tuspyserver v4.4.1 509.0K downloads/30d#6,273 on PyPI
License unclear Active released

What it is and what it does

tuspyserver is a FastAPI router that adds resumable file upload capability to your application via the tus protocol. It handles the complexity of chunked uploads—allowing clients to pause and resume transfers—while managing metadata, expiration, and cleanup automatically. The router mounts directly into a FastAPI app and requires only fastapi>=0.110 and Python>=3.8.

You can customize behavior through optional hooks: validate uploads before they start (pre-create hook), run post-processing after completion (on_upload_complete), or inject dependencies to access your own services like databases or authentication. By default it stores files on the local filesystem, but you can swap in an S3 backend via the s3 extra. The package exposes a full HTTP API with upload, download, HEAD, DELETE, and OPTIONS endpoints, and handles the TUS protocol headers needed for resumable transfers.

Use it for:

  • Building a web app where users upload large files and need to resume if their connection drops.
  • Validating file metadata or user permissions before accepting an upload via the pre-create hook.
  • Logging completed uploads or triggering post-processing with the completion hook.
  • Storing uploads directly to S3 instead of local disk to avoid coupling to a network filesystem.
  • Implementing per-user upload quotas or directory routing via dependency injection.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A FastAPI router that implements the tus resumable upload protocol, handling chunked file uploads with optional post-upload hooks and pluggable storage backends.

Yes. The package is actively maintained (released 1 day ago), has low install friction, zero known vulnerabilities, and solves a real problem—resumable uploads are non-trivial to implement correctly. The single fastapi dependency is lightweight, and the API is straightforward. The only caveat is that the license is unclear in the metadata, so verify the actual license in the repository before using in a commercial or copyleft context.

Install

tuspyserver on PyPI

pip

pip install tuspyserver

uv

uv add tuspyserver

poetry

poetry add tuspyserver

Installing tuspyserver

Before you install

Low friction: pure Python wheel with a single runtime dependency on fastapi>=0.110. Active maintenance with a release 1 day old.

Quickstart

pip install tuspyserver

from tuspyserver import create_tus_router
from fastapi import FastAPI

app = FastAPI()
app.include_router(
    create_tus_router(
        files_dir="./uploads",
        days_to_keep=5,
    )
)

Requires Python>=3.8 and fastapi>=0.110. CORS headers must be exposed for chunked uploads to work correctly.

Verify before relying

  • Whether the S3 storage backend (boto3 extra) is production-ready and how it differs from local filesystem storage.
  • Performance characteristics under high concurrency or with very large files.
  • Whether the default 5-day retention policy is configurable per upload or only globally.

Package facts

License not declared (unclear)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — fastapi
Maintenance actively maintained — 1 days since the last release
First released
Downloads 509,045/month — #6,273 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tuspyserver-4.4.1-py3-none-any.whl

Tags

tus protocol serverresumable file uploadschunked upload handlerfastapi upload routertus.io implementationresumable upload libraryfile chunk management
file-uploadtus-protocolresumable-transfer

More Dynamic Content packages