{ "info": { "author": "Guio G\u00fcnther", "author_email": "agx@sigxcpu.org", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v3 or later (LGPLv3+)", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Flask-XStatic-Files\n===================\n\n.. image:: https://travis-ci.org/agx/flask-xstatic-files.svg?branch=master\n :target: https://travis-ci.org/agx/flask-xstatic-files\n\n.. highlight:: python\n\nA `Flask`_ extionsion to serve `XStatic`_ files. Can be useful if you\ndon't use an asset pipeline and want to serve e.g. XStatic packaged\njavascript files like `JQuery`_ directly.\n\nSetup\n-----\nUpon initialization tell Flask about the XStatic modules you want to\nuse. This example uses JQuery and D3::\n\n app = Flask(__name__)\n app.config.from_object(__name__)\n app.config.['XSTATIC_MODULES'] = ['jquery', 'd3']\n xsf = XStaticFiles(app)\n\nThe modules can be given as list or comma separated (``jquery,d3``).\n\nServing Files\n-------------\nThe extension already installs a route handler for you so files under\n``/xstatic//`` are served automatically. To generate these\nURLs you can use ``url_for``::\n\n xsf.url_for('jquery', 'jquery.min.js')\n\nIn templates you can use ``xstatic_url_for``:\n\n.. code-block:: html\n\n \n\nto generate these URLs. This has the advantage that you can later\nserve files from a static web server by adjusting ``XSTATIC_ROOT`` and\n``XSTATIC_PROTO`` without having to modify any code.\n\nIn case you want to serve XStatic files from other URLs use ``serve``\nor ``serve_or_404``::\n\n @app.route('/somewhere-else/jquery/jquery.min.js')\n def serve_jquery():\n return xsf.serve_or_404('jquery', 'jquery.min.js')\n\n.. _Flask: http://flask.pocoo.org/\n.. _XStatic: https://xstatic.readthedocs.io/en/latest/\n.. _JQuery: https://pypi.python.org/pypi/XStatic-jQuery", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/agx/flask-xstatic-files", "keywords": "", "license": "LGPLv3+", "maintainer": "", "maintainer_email": "", "name": "Flask-XStatic-Files", "package_url": "https://pypi.org/project/Flask-XStatic-Files/", "platform": "any", "project_url": "https://pypi.org/project/Flask-XStatic-Files/", "project_urls": { "Homepage": "http://github.com/agx/flask-xstatic-files" }, "release_url": "https://pypi.org/project/Flask-XStatic-Files/0.0.2/", "requires_dist": null, "requires_python": "", "summary": "Easily use XStatic files in flask", "version": "0.0.2" }, "last_serial": 3450039, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "9366ca8a32120713e672216099e5c81a", "sha256": "a536fb73172ee5d9df74a2e39587217e10ff3d4dd5b5e05855287976a49050cb" }, "downloads": -1, "filename": "Flask-XStatic-Files-0.0.1.tar.gz", "has_sig": true, "md5_digest": "9366ca8a32120713e672216099e5c81a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3218, "upload_time": "2017-12-21T11:45:31", "url": "https://files.pythonhosted.org/packages/78/f6/d693f3dbc51936151caaa4e06af939387e14f11650f33bb863cacebd81dd/Flask-XStatic-Files-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "9c9bdc2ce911b180f5f6c232d39d8815", "sha256": "211e66ea716d972e2af5a446af0abf1c9cf2ed939fddca2da6147038e4707365" }, "downloads": -1, "filename": "Flask-XStatic-Files-0.0.2.tar.gz", "has_sig": true, "md5_digest": "9c9bdc2ce911b180f5f6c232d39d8815", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3617, "upload_time": "2017-12-29T14:16:06", "url": "https://files.pythonhosted.org/packages/2e/70/fa321e3d0a02ec93d9d536b214883c3ce1da0720b327d2f15ce1729f1384/Flask-XStatic-Files-0.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9c9bdc2ce911b180f5f6c232d39d8815", "sha256": "211e66ea716d972e2af5a446af0abf1c9cf2ed939fddca2da6147038e4707365" }, "downloads": -1, "filename": "Flask-XStatic-Files-0.0.2.tar.gz", "has_sig": true, "md5_digest": "9c9bdc2ce911b180f5f6c232d39d8815", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3617, "upload_time": "2017-12-29T14:16:06", "url": "https://files.pythonhosted.org/packages/2e/70/fa321e3d0a02ec93d9d536b214883c3ce1da0720b327d2f15ce1729f1384/Flask-XStatic-Files-0.0.2.tar.gz" } ] }