tuspyserver
A Python tus server implementation as a FastAPI router
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 tuspyserveruv
uv add tuspyserverpoetry
poetry add tuspyserverInstalling 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
More Dynamic Content packages
MarkupSafe provides a text object that escapes…
permissive · top 100 on PyPI
Jinja2Jinja2 is a templating engine that renders…
permissive · top 100 on PyPI
soupsieveSoupsieve is a CSS selector library designed to…
permissive · top 100 on PyPI
WerkzeugWerkzeug is a WSGI utility library providing…
permissive · top 1,000 on PyPI
FlaskFlask is a lightweight WSGI web application…
permissive · top 1,000 on PyPI
MakoMako compiles Python-embedded templates into…
permissive · top 1,000 on PyPI
tuspyA Python client for uploading files to servers…
permissive · top 5,000 on PyPI
google-resumable-mediaHandles resumable uploads and downloads for…
permissive · top 1,000 on PyPI
fastapi-limiterAdds request rate limiting to FastAPI routes…
permissive · top 5,000 on PyPI
python-multipartParses multipart form data from HTTP requests…
permissive · top 1,000 on PyPI
s3transfers3transfer manages concurrent uploads and…
permissive · top 100 on PyPI
jupyter-ai-routerProvides the core message routing layer for…
permissive · top 15,000 on PyPI
streaming-form-dataParses multipart/form-data streams…
permissive · top 15,000 on PyPI
obstoreobstore provides a unified Python interface to…
permissive · top 5,000 on PyPI
synapse-s3-storage-providerA Synapse media storage provider that…
permissive · top 15,000 on PyPI
fastapi-decoratorsConverts functions into FastAPI-compatible…
permissive · top 15,000 on PyPI