{ "info": { "author": "Thomas Kluyver", "author_email": "thomas@kluyver.me.uk", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: HTTP Servers" ], "description": "Utilities for using XStatic in Tornado applications\n---------------------------------------------------\n\n`XStatic `_ is a means of\npackaging static files, especially JS libraries, for Python applications.\n`Tornado `_ is a Python web framework.\n\nThis integration provides:\n\n- ``XStaticFileHandler`` to serve static files from XStatic packages.\n- ``xstatic_url`` ui method to build URLs for XStatic files, including\n the ``?v=...`` tag that Tornado uses for cache invalidation.\n\nTo use these:\n\n.. code:: python\n\n import tornado.ioloop\n import tornado.web\n from tornado_xstatic import XStaticFileHandler, xstatic_url\n\n class MyHandler(tornado.web.RequestHandler):\n def get(self):\n self.render(\"mytemplate.html\")\n\n\n if __name__ == \"__main__\":\n application = tornado.web.Application(\n [\n (r\"/\", MyHandler),\n (r\"/xstatic/(.*)\", XStaticFileHandler,\n {\"allowed_modules\": [\"jquery\", \"bootstrap\"]}),\n ],\n ui_methods={'xstatic_url': xstatic_url('/xstatic/')}\n )\n application.listen(8888)\n tornado.ioloop.IOLoop.instance().start()\n\nPassing ``allowed_modules`` is optional: if it is not provided, files from any\nXStatic module may be served.\n\nIn your template, you can then do this::\n\n \n \n\n ", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://www.github.com/takluyver/tornado_xstatic", "keywords": null, "license": null, "maintainer": null, "maintainer_email": null, "name": "tornado_xstatic", "package_url": "https://pypi.org/project/tornado_xstatic/", "platform": null, "project_url": "https://pypi.org/project/tornado_xstatic/", "project_urls": { "Homepage": "https://www.github.com/takluyver/tornado_xstatic" }, "release_url": "https://pypi.org/project/tornado_xstatic/0.2/", "requires_dist": null, "requires_python": null, "summary": "Utilities for using XStatic in Tornado applications", "version": "0.2" }, "last_serial": 1496404, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "22107ce3bbcc0439636885f248df63cf", "sha256": "f41cff3b5884372f63d28b6887df3d29dce0fb44e1ce31c8996d626ff8b72015" }, "downloads": -1, "filename": "tornado_xstatic-0.1.tar.gz", "has_sig": false, "md5_digest": "22107ce3bbcc0439636885f248df63cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2357, "upload_time": "2014-09-29T17:54:58", "url": "https://files.pythonhosted.org/packages/e5/e3/1614610f24bf276930f6e6eb5b9bfc17e51efd202b591d1b5e58a880c838/tornado_xstatic-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7cf83908247c90c5bb48a5245b1fa29b", "sha256": "b542e2e4edb959bef5ef69b17b133460bda97df8d05b9490beb6a0cfc63faa94" }, "downloads": -1, "filename": "tornado_xstatic-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7cf83908247c90c5bb48a5245b1fa29b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3034, "upload_time": "2015-04-08T20:18:16", "url": "https://files.pythonhosted.org/packages/3f/5d/51ce8394499f331bd4a9717d9667559aabe6315fcaa0307c4c11555577f0/tornado_xstatic-0.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7cf83908247c90c5bb48a5245b1fa29b", "sha256": "b542e2e4edb959bef5ef69b17b133460bda97df8d05b9490beb6a0cfc63faa94" }, "downloads": -1, "filename": "tornado_xstatic-0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7cf83908247c90c5bb48a5245b1fa29b", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 3034, "upload_time": "2015-04-08T20:18:16", "url": "https://files.pythonhosted.org/packages/3f/5d/51ce8394499f331bd4a9717d9667559aabe6315fcaa0307c4c11555577f0/tornado_xstatic-0.2-py2.py3-none-any.whl" } ] }