{ "info": { "author": "Rudy Lattae", "author_email": "rudylattae@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "========\nOverview\n========\n\n**bottle-servefiles** can serve static files for your bottle.py application.\n\nI deceided to create this application to further my understanding \nof WSGI and how to build pluggable apps for the bottle.py ecosystem.\n\nbottle-servefiles aims to be a simple WSGI app that can be mounted into any \nbottle.py powered app in order to serve static files from any url.\n\nFor instance in a regualar bottle.py app you may have the code below \nto serve static files::\n\n from bottle import route\n import bottle\n \n ...\n \n @route('/static/:filename#.*#')\n def static(filename):\n bottle.static_file(filename, root=...)\n\nWhat I would like is to be able to mount a reusable static file handler \non any path I chose within my application, without having to explicitly \nattach the path to the handler definition.\n\nOk I know that is pure nonsense but I had to come up with a compelling \nreason to build this thing in the first place.\n\nSo moving swiftly forward, with a static handler implemented as a \npluggable bottle app, I would be able to do the following::\n\n import bottle\n \n ...\n \n myapp = bottle.default_app()\n myapp.mount(bottle.load_app('servefiles'), '/media')\n bottle.run(app=myapp)\n \nIt doesn't look like much, but with a pluggable app, it now becomes \npossible to configure the application (e.g. set the \"root\" directory) \nper mounted instance of the static file handler!\n\n\nFeatures\n========\n\n TODO\n\n\nInstallation\n============\n\nYou can install upgrade or uninstall bottle-servefiles with these commands::\n\n > pip install bottle-servefiles\n > pip install -U bottle-servefiles\n > pip uninstall bottle-servefiles\n\nIf you do not have pip you may use easy install::\n\n > easy_install bottle-servefiles\n\nIf you do not have easy_install, you may download the piot \nsource distribution archive. Extract it and run::\n\n > python setup.py install\n\n\nExample usage \n=============\n\nThis is a basic outline of how you would use bottle-servefiles \nto server static files from your application.\n\nCreate an application module \"app.py\" with the contents::\n\n import bottle\n \n \n class MySite(object):\n def __init__(self, app=None):\n self.app = app if app else bottle.default_app()\n \n def __call__(self, environ, start_response):\n return self.app(environ, start_response)\n \n \n if __name__ == '__main__':\n mysite = MySite()\n mysite.app.mount(bottle.load_app('servefiles'), '/__media')\n bottle.debug(True)\n bottle.run(app=foo, reloader=True)\n \n\n\n-----\n\nCopyright (c) 2011 - Rudy Lattae. Released under the New BSD License.\n\n=========\nChangelog\n=========", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/rudylattae/bottle-servefiles", "keywords": "bottle,bottle.py,static,file,files,web,app", "license": "Simplified BSD", "maintainer": null, "maintainer_email": null, "name": "bottle-servefiles", "package_url": "https://pypi.org/project/bottle-servefiles/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/bottle-servefiles/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/rudylattae/bottle-servefiles" }, "release_url": "https://pypi.org/project/bottle-servefiles/0.1.2dev/", "requires_dist": null, "requires_python": null, "summary": "A reusable app that serves static files for bottle apps", "version": "0.1.2dev" }, "last_serial": 787005, "releases": { "0.0.1dev": [ { "comment_text": "", "digests": { "md5": "e7067b4f703f55166c69937393de0787", "sha256": "3d0ff125a32bb4c2e05b278e64db6eff990159eae9e0b9983f6574f367241fb3" }, "downloads": -1, "filename": "bottle-servefiles-0.0.1dev.zip", "has_sig": false, "md5_digest": "e7067b4f703f55166c69937393de0787", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8484, "upload_time": "2011-01-06T08:57:21", "url": "https://files.pythonhosted.org/packages/79/cf/1a3ba8309247bc4792222a2b56a5634163e2d752fbe992f9755731505d2f/bottle-servefiles-0.0.1dev.zip" } ], "0.1.0dev": [ { "comment_text": "", "digests": { "md5": "6451e5ed4b40be83c531a09df10ec30d", "sha256": "78d3f841cab034e159a253cfd7dfe97aa27a5df9e0c35de398bf5c2de87c42d3" }, "downloads": -1, "filename": "bottle-servefiles-0.1.0dev.zip", "has_sig": false, "md5_digest": "6451e5ed4b40be83c531a09df10ec30d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8868, "upload_time": "2011-10-07T10:09:55", "url": "https://files.pythonhosted.org/packages/26/0d/f7919f07995f29144a8c35619d05f036122009d6cd59d63d768b60bfa8e6/bottle-servefiles-0.1.0dev.zip" } ], "0.1.1dev": [ { "comment_text": "", "digests": { "md5": "e28c46708600e09a7ea259073fea317a", "sha256": "d8095e14984141e97b304f0d6ee7d864cd23cd6e467efcffd31802ce04fa6469" }, "downloads": -1, "filename": "bottle-servefiles-0.1.1dev.zip", "has_sig": false, "md5_digest": "e28c46708600e09a7ea259073fea317a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8850, "upload_time": "2011-10-07T10:38:26", "url": "https://files.pythonhosted.org/packages/b5/b7/7c1462b07978dc58bc0da734e6d12bed6e2b8db4de9dce64986c070be799/bottle-servefiles-0.1.1dev.zip" } ], "0.1.2dev": [ { "comment_text": "", "digests": { "md5": "7f0f2e2df7cd99858d58abefb26eb6a3", "sha256": "163f182a224c6b4bce47284948d8d7d747662d9da63becf76b4a543f824a2ca0" }, "downloads": -1, "filename": "bottle-servefiles-0.1.2dev.zip", "has_sig": false, "md5_digest": "7f0f2e2df7cd99858d58abefb26eb6a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8868, "upload_time": "2011-10-08T08:29:16", "url": "https://files.pythonhosted.org/packages/53/7f/07256114a05b3410de0aa2cf046aff3f8933fcd6d3d3309ca24a72cbc69f/bottle-servefiles-0.1.2dev.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7f0f2e2df7cd99858d58abefb26eb6a3", "sha256": "163f182a224c6b4bce47284948d8d7d747662d9da63becf76b4a543f824a2ca0" }, "downloads": -1, "filename": "bottle-servefiles-0.1.2dev.zip", "has_sig": false, "md5_digest": "7f0f2e2df7cd99858d58abefb26eb6a3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8868, "upload_time": "2011-10-08T08:29:16", "url": "https://files.pythonhosted.org/packages/53/7f/07256114a05b3410de0aa2cf046aff3f8933fcd6d3d3309ca24a72cbc69f/bottle-servefiles-0.1.2dev.zip" } ] }