{ "info": { "author": "Rian Hunter", "author_email": "rian@alum.mit.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: No Input/Output (Daemon)", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: System :: Networking" ], "description": "dropboxwsgi\r\n============\r\n\r\n``dropboxwsgi`` is a Python_ package that provides a WSGI_ application that\r\nimplements an HTTP_ interface into the `Dropbox API`_. This package\r\nincludes a server application, also called ``dropboxwsgi``, that runs\r\nthe WSGI application from the command line.\r\n\r\nThis is useful in situations where you'd like to serve a web site\r\nout of your Dropbox, either to the world or in a private network.\r\nCompare this to the current solution of linking the Dropbox desktop\r\nclient on your server and serving out of your Dropbox folder.\r\n\r\nThis package also contains a caching middleware that will cache data\r\nfrom the Dropbox API onto the local disk (or whatever storage\r\nimplementation you provide) to eliminate redundant data transfer\r\nbetween your server and Dropbox.\r\n\r\nBy the way, this package also supports Python 3. Yay!\r\n\r\nInstallation\r\n------------\r\n\r\nInstallation is easy and fun::\r\n\r\n $ python setup.py install\r\n\r\nFeatures\r\n--------\r\n\r\n* Supports standard HTTP caching headers (ETag, Last-Modified) and logic\r\n* Optional automatically generated directory listings\r\n* \"index.html\" file support\r\n* Caching middleware (in ``dropboxwsgi.caching``)\r\n* Supports Python 2.5+, 3+, PyPy\r\n* Automatically uses gevent if available\r\n\r\nServer Application Usage\r\n------------------------\r\n\r\n``dropboxwsgi`` is both a server application and a library. Let's try\r\nusing it on the command line first::\r\n\r\n $ cat < config.ini\r\n [Credentials]\r\n consumer_key = \r\n consumer_secret = \r\n access_type = app_folder\r\n\r\n [Server]\r\n http_root = http://localhost:8080\r\n listen = 8080\r\n EOF\r\n $ dropboxwsgi -c config.ini -l info\r\n Server is running; using wsgiref server\r\n\r\nPretty simple. Now point your browser to ``http://localhost:8080/``. If\r\nyou want to run this in production I recommend using the gevent_ WSGI\r\nserver and using nginx_ as frontend proxy.\r\n\r\nLibrary Usage\r\n-------------\r\n\r\nWSGI applications, like ``dropboxwsgi``, have the benefit of being\r\nable to run in a variety of server environments. `App Engine`_ and\r\nHeroku_ come to mind but running it on your own VPS works too. Let's\r\ntry it using the reference WSGI implementation included with Python::\r\n\r\n #!/usr/bin/python\r\n\r\n from wsgiref.simple_server import make_server\r\n from dropboxwsgi.dropboxwsgi import make_app, MemoryCredStorage\r\n \r\n config = dict(http_root=\"http://localhost:8080\",\r\n consumer_key=\"\",\r\n access_type\"dropbox or app_folder\")\r\n\r\n app = make_app(config, MemoryCredStorage())\r\n\r\n make_server(\"\", 8080, app).serve_forever()\r\n\r\nThe vanilla WSGI application provides the standard HTTP caching headers\r\n(both ETag and Last-Modified) but otherwise doesn't litter the HTTP\r\nheader space. This makes it so you can layer as much middleware as you\r\nwant between the application and the server.\r\n\r\nExtensibility\r\n-------------\r\n\r\nIf I haven't stressed it already enough quite yet, let me try once more.\r\nThere are dozens of middleware packages available for WSGI and even more\r\nproxy servers that speak HTTP. Extending ``dropboxwsgi`` is simply a\r\nmatter of hooking things together. Do you want a caching Dropbox-backed\r\nserver with HTTP auth? Squid_ + nginx + ``dropboxwsgi`` solves your\r\nproblem. The possibilities are endless!\r\n\r\nCopyright Stuff\r\n---------------\r\n\r\nCopyright (c) Dropbox, Inc.\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the \"Software\"),\r\nto deal in the Software without restriction, including without limitation the\r\nrights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\nsell copies of the Software, and to permit persons to whom the Software is\r\nfurnished to do so, subject to the following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be included in\r\nall copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\r\nTHE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\r\nOTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\r\nARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\r\nOTHER DEALINGS IN THE SOFTWARE.\r\n\r\n.. _Python: http://www.python.org/\r\n.. _WSGI: http://http://www.python.org/dev/peps/pep-3333/\r\n.. _HTTP: http://www.w3.org/Protocols/rfc2616/rfc2616.html\r\n.. _Dropbox API: https://www.dropbox.com/developers\r\n.. _gevent: http://www.gevent.org/\r\n.. _nginx: http://nginx.org/\r\n.. _App Engine: https://developers.google.com/appengine/docs/python/tools/webapp/running\r\n.. _Heroku: https://devcenter.heroku.com/articles/python\r\n.. _Squid: http://www.squid-cache.org/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rianhunter/dropboxwsgi", "keywords": "networking", "license": "MIT License", "maintainer": "", "maintainer_email": "", "name": "dropboxwsgi", "package_url": "https://pypi.org/project/dropboxwsgi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/dropboxwsgi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rianhunter/dropboxwsgi" }, "release_url": "https://pypi.org/project/dropboxwsgi/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "WSGI-compatible HTTP interface to Dropbox", "version": "1.0.1" }, "last_serial": 791413, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "46b4dd563be925742449a79869aba0c8", "sha256": "1be428b7c4a6fda4959183f0157acf4591ac0bad877b4b768b55d800a60014b7" }, "downloads": -1, "filename": "dropboxwsgi-1.0.1.tar.gz", "has_sig": false, "md5_digest": "46b4dd563be925742449a79869aba0c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14621, "upload_time": "2012-04-06T02:29:21", "url": "https://files.pythonhosted.org/packages/d4/47/d3e909f04c3cb3c5d342cae8709efe87f0f7ed10858845c695332e169e27/dropboxwsgi-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "46b4dd563be925742449a79869aba0c8", "sha256": "1be428b7c4a6fda4959183f0157acf4591ac0bad877b4b768b55d800a60014b7" }, "downloads": -1, "filename": "dropboxwsgi-1.0.1.tar.gz", "has_sig": false, "md5_digest": "46b4dd563be925742449a79869aba0c8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14621, "upload_time": "2012-04-06T02:29:21", "url": "https://files.pythonhosted.org/packages/d4/47/d3e909f04c3cb3c5d342cae8709efe87f0f7ed10858845c695332e169e27/dropboxwsgi-1.0.1.tar.gz" } ] }