Skip to content

v0.0.5

Choose a tag to compare

@injaeryou injaeryou released this 25 Apr 10:08

v0.0.5 — TUS Extensions, ASGI, Locks, Metrics, CLI

Adds four TUS protocol extensions, ASGI/CLI entrypoints, distributed-friendly locking, and first-class observability.

✨ Highlights

TUS protocol extensions

  • Concatenation extensionUpload-Concat: partial / final. Split uploads and merge server-side across all backends (SQLite, S3, GCS, Azure).
  • Upload-Defer-Length extension — create with Upload-Defer-Length: 1 and supply the length on a later PATCH.
  • Multi-algorithm checksumUpload-Checksum now accepts sha1, sha256, md5, and crc32.
  • X-HTTP-Method-Override — allow PATCH/DELETE tunneled through POST for restrictive proxies.

New interfaces

  • TusASGIApp — mount directly into FastAPI / Starlette / uvicorn stacks.
  • CLIresumable-upload serve to launch a server in one command.

Scale-out & concurrency

  • LockBackend — pluggable locking with InMemory (default) and Redis backends, making concurrent PATCH safe across multiple workers.
  • Parallel uploadsTusClient(parallel_uploads=N) splits a file into N partial uploads transferred concurrently, then concatenates into the final upload.

Observability

  • Prometheus metrics/metrics endpoint with upload counters and histograms.
  • Client hooks — retry and progress callbacks for instrumentation.

Storage & fingerprinting

  • PartialMD5 fingerprint plus support for arbitrary Callable fingerprints — much faster resume on large files.
  • URLStorage backendsInMemoryURLStorage and SQLiteURLStorage enable cross-session resume on the client.

🐛 Fixes

  • fix(server): apply Upload-Expires to concatenated final uploads (31eeebf).
  • fix(server): preserve legacy Storage subclass compatibility (0e4a673).

🧰 Chores

  • Scope ty type checking to the resumable_upload package (1f904da).
  • Examples reorganized into examples/server/ and examples/client/, with new demos for error handling and success messaging.

📦 Install

pip install -U resumable-upload

# Cloud backends:
pip install -U "resumable-upload[s3]"      # boto3
pip install -U "resumable-upload[gcs]"     # google-cloud-storage
pip install -U "resumable-upload[azure]"   # azure-storage-blob

# Redis lock backend:
pip install -U "resumable-upload[redis]"

Full Changelog: v0.0.4...v0.0.5