8000 GitHub - drmats/pyfup at v0.3.2
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

drmats/pyfup

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 

Repository files navigation

pyfup

Basic file upload WSGI application (python >=2.6.x/>=3.x)

This script brings up a simple_server from python's wsgiref package and runs a really simple WSGI (PEP 3333) application on it. It allows to upload any file using multipart/form-data form content type.

Don't use it in production environment as it has not been reviewed for security issues, however it's handy for ad-hoc file transfers between machines over HTTP protocol.

installation

No installation is necessary. Just download the latest version.

usage

  • stand alone:

      python fup.py [-h] [--host HOST] [-v] [port]
    
  • with gunicorn:

      gunicorn [-b HOST] --access-logfile - fup:app
    
  • in order to be able to accept big files and avoid "worker timeouts" it is desirable to use asynchronous (eventlet, gevent or tornado) worker classes:

      gunicorn [-b HOST] -k eventlet --access-logfile - fup:app
      gunicorn [-b HOST] -k gevent --access-logfile - fup:app
      gunicorn [-b HOST] -k tornado fup:app
    
  • with Twisted Web:

      twistd -n web [--port PORT] --wsgi fup.app
    
  • with uWSGI:

      uwsgi --plugin python --http :[PORT] --wsgi-file fup.py --callable app
    

license

pyfup is released under the BSD 2-Clause license. See the LICENSE for more details.

notes

The script was tested and is known to work with python versions 2.7.2, 2.7.3, 2.7.5, 3.3.0, 3.3.2 and 3.3.3 on linux and windows, but should also work on python version >=2.6.x.

About

Basic file upload WSGI application.

Topics

5718

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0