{ "info": { "author": "Igor Davydenko", "author_email": "playpauseandstop@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "=============\nFlask-Dropbox\n=============\n\n.. image:: https://travis-ci.org/playpauseandstop/Flask-Dropbox.png?branch=master\n :target: https://travis-ci.org/playpauseandstop/Flask-Dropbox\n\n.. image:: https://pypip.in/v/Flask-Dropbox/badge.png\n :target: https://crate.io/packages/Flask-Dropbox\n\n\nDropbox Python SDK support for Flask applications.\n\nRequirements\n============\n\n* `Python `_ 2.6 or 2.7\n* `Flask `_ 0.8 or higher\n* `Dropbox Python SDK `_ 1.4 or higher\n\nInstallation\n============\n\n::\n\n $ pip install Flask-Dropbox\n\nLicense\n=======\n\n``Flask-Dropbox`` is licensed under the `BSD License\n`_.\n\nConfiguration\n=============\n\nSECRET_KEY\n----------\n\n**REQUIRED.** As token would be stored in Flask's `session\n`_ instance, you need to\nconfigure secret key for your application.\n\nDROPBOX_KEY\n-----------\n\n**REQUIRED.** App key from Dropbox developer site.\n\nDROPBOX_SECRET\n--------------\n\n**REQUIRED.** Secret key from Dropbox developer site.\n\nDROPBOX_ACCESS_TYPE\n-------------------\n\n**REQUIRED.** Should be ``'dropbox'`` or ``'app_folder'`` as configured for\nyour app.\n\nDROPBOX_CALLBACK_URL\n--------------------\n\nBy default, you don't need to provide this setting, cause ``Flask-Dropbox``\nwill setup callback URL automaticly usign current host and type of request,\nbut if you don't trust us, you could to rewrite this setting manually.\n\nDROPBOX_CALLBACK_TEMPLATE\n-------------------------\n\nTemplate to be used for showing errors while trying to process oAuth callback\nfrom Dropbox API. By default: ``'dropbox/callback.html'``.\n\nNext boolean vars could be sent to the template:\n\n* ``error_oauth_token`` - Dropbox API didn't return oAuth token.\n* ``error_not_equal_tokens`` - oAuth token from Dropbox API is not equal to\n request token stored in Flask session.\n* ``error_response`` - Dropbox API returns ``ErrorResponse`` instance. Also\n actual exception as ``error`` var would be sent to the template too.\n\nDROPBOX_LOGIN_REDIRECT\n----------------------\n\nPage to redirect to after user successfully logged in with Dropbox account. By\ndefault: ``/``.\n\nDROPBOX_LOGOUT_REDIRECT\n-----------------------\n\nPage to redirect to after user logged out from authenticated Dropbox session.\nBy default: ``/``.\n\nDROPBOX_CACHE_STORAGE\n---------------------\n\n.. versionadded:: 0.3\n\nWhere to place account info, Dropbox client and Dropbox session instances. In\n0.2 and lower all this info stored in ``flask_dropbox.Dropbox`` instance, which\nisn't thread safe, but from 0.3 all these values stored to ``flask.g``. If you\nneed custom storage you can override this setting with object or string which\nwould be imported.\n\nUsage\n=====\n\n``app.py``::\n\n from flask import Flask\n from flask.ext.dropbox import Dropbox, DropboxBlueprint\n\n import settings\n\n\n app = Flask(__name__)\n app.config.from_object(settings)\n\n dropbox = Dropbox(app)\n dropbox.register_blueprint(url_prefix='/dropbox')\n\n``settings.py``::\n\n SECRET_KEY = 'some-secret-key'\n DROPBOX_KEY = 'dropbox-app-key'\n DROPBOX_SECRET = 'dropbox-app-secret'\n DROPBOX_ACCESS_TYPE = 'app_folder'\n\n``views.py``::\n\n from flask import url_for, redirect, request\n from werkzeug import secure_filename\n\n from app import app, dropbox\n\n\n @app.route('/')\n def home():\n return u'Click here to login with Dropbox.' % \\\n dropbox.login_url\n\n\n @app.route('/success/')\n def success(filename):\n return u'File successfully uploaded as /%s' % filename\n\n\n @app.route('/upload', methods=('GET', 'POST'))\n def upload():\n if not dropbox.is_authenticated:\n return redirect(url_for('home'))\n\n if request.method == 'POST':\n file_obj = request.files['file']\n\n if file_obj:\n client = dropbox.client\n filename = secure_filename(file.filename)\n\n # Actual uploading process\n result = client.put_file('/' + filename, file_obj.read())\n\n path = result['path'].lstrip('/')\n return redirect(url_for('success', filename=path))\n\n return u'
' \\\n u'' \\\n u'' \\\n u'
'\n\nBugs, feature requests?\n=======================\n\nIf you found some bug in ``Flask-Dropbox`` library, please, add new issue to\nthe project's `GitHub issues\n`_.\n\nChangeLog\n=========\n\n0.3\n---\n\n+ Flask 0.10 support\n+ Store account info, Dropbox client and session in thread-safe ``flask.g``\n storage instead of ``flask_dropbox.Dropbox`` instance\n+ Introduce ``DROPBOX_CACHE_STORAGE`` setting\n\n0.2\n---\n\n+ Add ``init_app`` method to ``Dropbox`` extension class.\n+ Do not send ``dropbox`` instance for initialization of ``DropboxBlueprint``\n class.\n+ Use ``current_app.extensions['dropbox']`` statement in views for getting\n initialized ``Dropbox`` instance.\n\n0.1.5\n-----\n\n+ Add ``register_blueprint`` shortcut to initialize ``DropboxBlueprint`` with\n default values in one line.\n+ Move ``Dropbox`` class from ``flask.ext.dropbox.utils`` to\n ``flask.ext.dropbox.extension`` module. But mainly, it wouldn't affected to\n your code if you used ``from flask.ext.dropbox import Dropbox`` statements.\n\n0.1.4\n-----\n\n+ Add ``dropbox`` library as install requirement in ``setup.py``.\n+ Update project short description.\n\n0.1.3\n-----\n\n+ Fix handling templates while installing via setup.py\n\n0.1.2\n-----\n\n+ Add support of Dropbox SDK 1.4.1\n\n0.1.1\n-----\n\n+ Check that access token is the instance of ``oauth.OAuthToken`` class if it\n exists in session.\n\n0.1\n---\n\n* Initial release.", "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/playpauseandstop/Flask-Dropbox", "keywords": "flask dropbox", "license": "BSD License", "maintainer": null, "maintainer_email": null, "name": "Flask-Dropbox", "package_url": "https://pypi.org/project/Flask-Dropbox/", "platform": "any", "project_url": "https://pypi.org/project/Flask-Dropbox/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/playpauseandstop/Flask-Dropbox" }, "release_url": "https://pypi.org/project/Flask-Dropbox/0.3/", "requires_dist": null, "requires_python": null, "summary": "Dropbox Python SDK support for Flask applications.", "version": "0.3" }, "last_serial": 774550, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "db1f842999c99470d9262b69e2e1656c", "sha256": "fc159f0453e6cd66330a7a4fe7c455c0ed330e3663b8d35d074a0da4c2e1a6db" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.tar.gz", "has_sig": false, "md5_digest": "db1f842999c99470d9262b69e2e1656c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6400, "upload_time": "2012-04-21T11:14:55", "url": "https://files.pythonhosted.org/packages/e4/00/6c3fbbe87eb976d272285cfbb5b4d888cac95cd152da2c1e3e6698facf19/Flask-Dropbox-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "547ddce4d8275e13e4d6e15805bf1024", "sha256": "72d50855b1b2f97bfae5cd6145a258312bc207ecfaaec48c878c3c194e6356c6" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.1.tar.gz", "has_sig": false, "md5_digest": "547ddce4d8275e13e4d6e15805bf1024", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6497, "upload_time": "2012-04-21T12:30:51", "url": "https://files.pythonhosted.org/packages/35/05/e9a2e195e8ebd3ef6fb4f5338ac164b8352894535354cf325b252cb19041/Flask-Dropbox-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "d3a80b642eb883515e894a9722ae2c23", "sha256": "ba6929b5f98762cf247d5e5411acbe89f8d2229d2ecfb542c03065fd2a6cabcd" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.2.tar.gz", "has_sig": false, "md5_digest": "d3a80b642eb883515e894a9722ae2c23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6774, "upload_time": "2012-07-11T11:38:33", "url": "https://files.pythonhosted.org/packages/fa/b1/52877d33eb935c738fdf82197407154f6ac648531c130383d8d55f3a3544/Flask-Dropbox-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7ff8c4ebe0e3bbd6ebbff0d14be8ea13", "sha256": "3f83fd500ec973cd462a6890ae0744955599369c848afdf39db5d40d17eb3f20" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7ff8c4ebe0e3bbd6ebbff0d14be8ea13", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6837, "upload_time": "2012-07-11T18:23:50", "url": "https://files.pythonhosted.org/packages/03/73/34ac6953a2dc0f4269e4fa620ebe64bfb065ff174dfd4d0fec82dbcc277f/Flask-Dropbox-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "cde0bcaeee3459d9dcf17bac9d2f0679", "sha256": "dfc47d0e7b9fa511b33d0ee3df4bb0bd17e2fa93e294ecae8e7c2f796ff3e0be" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.4.tar.gz", "has_sig": false, "md5_digest": "cde0bcaeee3459d9dcf17bac9d2f0679", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6886, "upload_time": "2012-08-15T11:46:10", "url": "https://files.pythonhosted.org/packages/9b/25/4ee8f276f6e51510e757982fab8c7a884bf5090e239f58a649c515b16105/Flask-Dropbox-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "8929a65486081c4cdafae5580d3cd3ab", "sha256": "ce6408fd5c597e02d9522cab96db1a31a325d418297a266f57724edc0bb94b59" }, "downloads": -1, "filename": "Flask-Dropbox-0.1.5.tar.gz", "has_sig": false, "md5_digest": "8929a65486081c4cdafae5580d3cd3ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7103, "upload_time": "2012-08-17T10:19:07", "url": "https://files.pythonhosted.org/packages/3d/c7/e2ee8c6fbfcb7f80778fb8ccf01f8fbae9af195fe1e1a4b04cea453d57cb/Flask-Dropbox-0.1.5.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4fa5fd63e7948da567eced50a32b630e", "sha256": "175e3f802099c99c89e9ddee544b7418c864c6b6d81702a1e9ad8d4b394c7106" }, "downloads": -1, "filename": "Flask-Dropbox-0.2.tar.gz", "has_sig": false, "md5_digest": "4fa5fd63e7948da567eced50a32b630e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7274, "upload_time": "2012-10-05T09:26:45", "url": "https://files.pythonhosted.org/packages/fa/5a/ab38d44124449da6917df7decef11a0261f33d6d985b3ca2f5b86246d5a2/Flask-Dropbox-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "1033c2302cb5c49e74bef6d248cc925d", "sha256": "4cc3538459e8d0284ee35526178d7afaf2bba859dce7b52fe3a200e3a11c2f9d" }, "downloads": -1, "filename": "Flask-Dropbox-0.3.tar.gz", "has_sig": false, "md5_digest": "1033c2302cb5c49e74bef6d248cc925d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8182, "upload_time": "2013-06-19T12:37:36", "url": "https://files.pythonhosted.org/packages/97/68/b00b0de974290e03827e8b984513199c9c4887906b5b16e90f7990c24f01/Flask-Dropbox-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1033c2302cb5c49e74bef6d248cc925d", "sha256": "4cc3538459e8d0284ee35526178d7afaf2bba859dce7b52fe3a200e3a11c2f9d" }, "downloads": -1, "filename": "Flask-Dropbox-0.3.tar.gz", "has_sig": false, "md5_digest": "1033c2302cb5c49e74bef6d248cc925d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8182, "upload_time": "2013-06-19T12:37:36", "url": "https://files.pythonhosted.org/packages/97/68/b00b0de974290e03827e8b984513199c9c4887906b5b16e90f7990c24f01/Flask-Dropbox-0.3.tar.gz" } ] }