Skip to main content

TUS py protocol implementation in FastAPI

Project description

FastAPI Tus

FastAPI Extension implementing the Tus.io server protocol

Prerequisites FastAPI

Installation

Installation from PyPi repository (recommended for latest stable release)

pip install tuspyserver

Usage

main.py

from fastapi import FastAPI
from starlette.middleware.cors import CORSMiddleware
from starlette.staticfiles import StaticFiles

from tusserver import tus

app = FastAPI()
app.add_middleware(
    CORSMiddleware,
    allow_origins=['*'],
    allow_methods=["*"],
    allow_headers=["*"],
)
app.mount("/static", StaticFiles(directory="static"), name="static")
app.include_router(tus.router, prefix="/files")

This package has the ability to upload, download, delete (including a scheduler) files.

python setup.py sdist bdist_wheel

Any contribution is welcomed.

Buy Me A Coffee

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

tuspyserver-1.1.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

tuspyserver-1.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file tuspyserver-1.1.0.tar.gz.

File metadata

  • Download URL: tuspyserver-1.1.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for tuspyserver-1.1.0.tar.gz
Algorithm Hash digest
SHA256 11a54d5271e4315f8e5d1208cbe26c2ea564f41a097c3edae16250e21869ac63
MD5 04ce089a95a0d5b64aa4d9fb71eea8d4
BLAKE2b-256 bab74b42831c49a416deb2835892c503c23d8d8546a6e9a989708c19915082c1

See more details on using hashes here.

File details

Details for the file tuspyserver-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: tuspyserver-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.9

File hashes

Hashes for tuspyserver-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec44264d2c879844d829840b9c6054125f654dd5b6c6d7102d436b1cdec60bc1
MD5 a021b2860fbe463042fb8f7171a7fe57
BLAKE2b-256 74286af2f81fa22d3520b01e4a39ea95a1d0c2b4da70f5748c5083ddff815336

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