New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

tuswsgi

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tuswsgi

python wsgi filter for tus protocol 1.0.0

  • 0.5.5
  • PyPI
  • Socket score

Maintainers
3

========= tusfilter

python wsgi filter for tus protocol 1.0.0, the tus resumable upload standard_.

Fork of https://github.com/everydo/tusfilter with bugfixes for WebOb Request usage.

.. _the tus resumable upload standard: http://tus.io/

install

::

pip install tuswsgi

Arguments

app required, the wsgi server application

upload_path str, required, path of the upload service

tmp_dir str, optional, directory to store temporary files, default /upload

expire int, optional, how long before cleanup old uploads in seconds, default 60*60*60

send_file bool, optional, False for send the absolute filepath in tmp_dir in the request body, True for an actual file uploaded, default False

max_size int, optional, maximum size of uploads in bytes, default 2**30, 1G

Example

flask ::

from tuswsgi import TusMiddleware
from flask import Flask

app = Flask(__name__)

@app.route("/upload_resumable/<tmpfile>", methods=['PATCH'])
def upload_resumable(tmpfile):
    # do something else
    return 'End of upload'

app.wsgi_app = TusMiddleware(
    app.wsgi_app,
    upload_path='/upload_resumable',
    tmp_dir='/tmp/upload',
)

History


0.5.5 (2023-03-15)

  • Don't cleanup uploaded files on every POST request.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc