{
"info": {
"author": "John Anderson",
"author_email": "sontek@gmail.com",
"bugtrack_url": null,
"classifiers": [
"Framework :: Pylons",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: WSGI :: Application"
],
"description": "Installation\n===================\n\n[](https://travis-ci.org/sontek/pyramid_webassets)\n[](https://coveralls.io/r/sontek/pyramid_webassets)\n\nInstall the package:\n\n``` bash\n$ pip install pyramid_webassets\n```\n\nEITHER add it to your Pyramid `production.ini` and `development.ini`:\n\n```\npyramid.includes =\n pyramid_debugtoolbar\n pyramid_tm\n pyramid_webassets\n```\n\nOR include it when configuring your application, usually in `__init__.py`:\n\n``` python\ndef main(global_config, **settings):\n ...\n config.include('pyramid_webassets')\n```\n\nConfiguration\n====================\nYou are required to set ``base_dir`` and ``base_url``, the rest are optional,\nbut we currently support:\n\n * ``base_dir``: The directory to output and search for assets\n * ``base_url``: The url static assets will be located\n * ``debug``: If webassets should be in debug mode (i.e no compression)\n * ``updater``: Different update configurations (i.e always, timestamp)\n * ``cache``: If we should use webassets cache (if boolean), or override default path to cache directory\n * ``jst_compiler``: A custom jst compiler, by default it uses underscore\n * ``url_expire``: If a cache-busting query string should be added to URLs\n * ``static_view``: If assets should be registered as a static view using Pyramid config.add_static_view()\n * ``cache_max_age``: If static_view is true, this is passed as the static view's cache_max_age argument (allowing control of expires and cache-control headers)\n * ``paths``: A JSON dictionary of PATH=URL mappings to add paths to alternative asset locations (`URL` can be null to only add the path)\n * ``bundles``: filename or [asset-spec] (or a list of either) (http://docs.pylonsproject.org/projects/pyramid/en/latest/glossary.html#term-asset-specification) of a YAML [bundle spec](http://webassets.readthedocs.org/en/latest/loaders.html?highlight=loader#webassets.loaders.YAMLLoader) whose bundles will be auto-registered\n\n``` ini\nwebassets.base_dir = %(here)s/app/static\nwebassets.base_url = static\nwebassets.debug = True\nwebassets.updater = timestamp\nwebassets.cache = False\nwebassets.jst_compiler = Handlebars.compile\nwebassets.url_expire = False\nwebassets.static_view = True\nwebassets.cache_max_age = 3600\nwebassets.bundles = mypackage:webassets.yaml\n```\n\nThen you can just use config.add_webasset to add bundles to your environment\n\n``` python\nfrom webassets import Bundle\n\njst = Bundle('templates/*.html',\n filters='jst',\n output='js/jst.js', debug=False)\n\nconfig.add_webasset('jst', jst)\n```\n\nAll other configurations are passed through to webassets, including\nfilter settings. These are adjusted as follows: if a value is exactly\n``true`` or ``false``, then it is converted to a boolean; if a value\nis prefixed with the string ``json:``, then it is JSON-parsed. This\nallows pyramid-webassets to handle basic extensible filter\nconfigurations without needing any python code, for example:\n\n``` ini\nwebassets.less_run_in_debug = true\nwebassets.less_extra_args = json:[\"--line-numbers=mediaquery\", \"-O2\"]\n```\n\nUse asset specs instead of files and urls\n----------------------------------------------\nIt's possible to use an asset specifications (package:file) instead of simple file names.\n\n- If the asset specifications declares a path outside the base_dir, the file will be copied.\n- Otherwise, it will work like a normal bundle file.\n\nIf files are bundled from other packages and those packages act like pyramid\nplugins adding their own ``add_static_view``, webassets will use those static\nview urls to show the individual files if needed (for example, in development mode).\n\nIf you have defined your own static route and you want to use it with webassets,\nfor example:\n\n``` python\nconfig.add_static_view('static-stuff', 'my.super.app:static')\n```\n\nSetting the base url configuration option to an asset specification:\n\n```\nbase_url = my.super.app:static\n```\n\nWill make webassets use the ``/static-stuff`` route for your assets. Note:\nthe absolute or relative path depends on where is your application is deployed.\n\nUse with templates\n========================\nIncluded are helpers that you can use with your templates. Additional helpers\nare documented below in the section labeled \"Extras\".\n\nMako\n-----\n\nYou can use the global webassets tag:\n``` python\n% for url in webassets(request, 'css/bootstrap.css', 'css/bootstrap-responsive.css', output='css/generated.css', filters='cssmin'):\n \n% endfor\n```\n\nor you can grab the environment from the request.\n\nJinja2\n-------\nIf you are using Jinja2, you can just do the following configuration (this assumes use of pyramid_jinja2):\n\n``` python\nconfig.add_jinja2_extension('webassets.ext.jinja2.AssetsExtension')\nassets_env = config.get_webassets_env()\njinja2_env = config.get_jinja2_environment()\njinja2_env.assets_environment = assets_env\n```\nand then:\n\n``` python\n{% assets \"jst\" %}\n\n{% endassets %}\n```\n\nGeneric\n--------\nIt's always possible to access the environment from the request.\n\n```python\njst_urls = request.webassets_env['jst'].urls()\n```\n\nExtras\n====================\n\nThere are a few more utility methods you can use to make working with webassets\nwithin your Pyramid application easier.\n\nConfiguration\n---------------\nThese methods can be called on the `Configurator` instance during startup:\n\n``add_webasset(name, bundle)``: Registers a bundle with webassets\n\n``add_webassets_setting(key, value)``: Update the environment configuration\n\n``add_webassets_path(path, url)``: Append a URL mapping to the environment\n\n``get_webassets_env_from_settings(settings, prefix='static_assets')``: Pass a\ndictionary of your settings and an optional keyword argument of the prefix in\nyour configuration and it will return a webassets environment.\n\n``get_webassets_env()``: This will pull the environment out of the registry.\n\nRequest handling\n------------------\nThese properties and helpers are attached to the `Request` object:\n\n``request.webassets_env``: Access the webassets environment\n\n``request.webassets(*bundle_names, **kwargs)``: Build the named bundles.\nKeyword arguments will be passed to webassets to influence bundling.\n\nBuilding assets from a script\n=======================================\nThe `webassets` module includes a command line script, also called `webassets`,\nwhich can be used to build bundles offline. When integrating with Pyramid, it\ncan be helpful to bootstrap the environment using paster instead, like so:\n\n``` python\nimport pyramid.paster\nimport webassets.script\n\napp_env = pyramid.paster.bootstrap('config.ini')\nassets_env = app_env['request'].webassets_env\nwebassets.script.main(['build'], assets_env)\n```\n\n\n0.10 (2018-11-03)\n=================\n\nBackwards Incompatibilities\n---------------------------\n\n- Support for pyramid releases older than v1.4 has been dropped.\n\nFeatures\n--------\n\n- Support for pyramid releases v1.4 and newer has been added.\n\n0.9 (2014-10-21)\n================\n\nFeatures\n--------\n\n- Support for overriding named bundles when using the ``webassets.bundles``\n setting. Files earlier in the list take precedence and can override named\n bundles defined in later files. Combined with asset specifications for the\n file names this makes it easy to extend the bundle configuration of other\n packages.\n\n0.8 (2014-08-04)\n================\n\nFeatures\n--------\n\n- Support versions of webassets v0.8.x, v0.9.x, and 0.10.x.\n\n- Support glob specifications for input files.\n\n- Introduced support for specifying the base directory and input files, and\n output directories using asset specs. Patches by Randall Leeds and John\n Anderson, documentation by Javier Gonel. See\n https://github.com/pyramid_webassets/issues/13\n https://github.com/pyramid_webassets/issues/14\n https://github.com/pyramid_webassets/issues/31 and\n https://github.com/pyramid_webassets/issues/41 .\n\n- A new configuration directive, ``add_webassets_setting``, that updates the\n provided key and value in the webassets environment configuration can be\n called from ``Configurator`` instances.\n\n- A new configuration directive, ``add_webassets_path``, that adds an\n additional mapping from a path to a URL prefix can be called from\n ``Configurator`` instances. Patch by Jason Brumwell.\n\n- Support for ``auto_build``, ``jst_namespace``, and ``url_expire``\n webassets settings. Patches by Svante Paldan, Olaf Conradi, and Randall\n Leeds. See https://github.com/pyramid_webassets/issues/15\n https://github.com/pyramid_webassets/issues/17 and\n https://github.com/pyramid_webassets/issues/20 .\n\n- A new ``paths`` setting allows a JSON dictionary of mappings from paths to\n URLs to be specified in order to support multiple load paths and URL\n prefixes. Patch by metagriffin.\n\n- Support for multiple values in the ``load_path`` setting. Patch by Greg\n Kempe. See https://github.com/pyramid_webassets/issues/33 .\n\n- A new ``cache_max_age`` setting controls the expiration and caching\n behavior of the static view. The value of this setting is passed through to\n the ``add_static_view`` invocation.\n\n- A ``bundles`` setting can now be specified which lists YAML files to parse\n for bundle definitions. Earlier entries override bundles defined in later\n entries. Patch by metagriffin and multiple value support by Randall Leeds.\n See https://github.com/pyramid_webassets/issues/35 .\n\n- Configuration values prefixed with the string 'json:' are parsed as JSON\n before being passed to webassets. Patch by metagriffin.\n\nBug Fixes\n---------\n\n- Assets can now be built without an active request.\n\n- The ``cache`` and ``manifest`` options now support valid non-boolean values\n as described by the webassets documentation. Patch by Mike Wirth. See\n https://github.com/pyramid_webassets/issues/11 .\n\n- If the ``cache`` argument specifies a directory ensure that it exists.\n Patch by metagriffin. See https://github.com/pyramid_webassets/issues/29 .\n\nDocumentation\n-------------\n\n- Cleaned up documentation markup. Patch by Michael Merickel.\n https://github.com/pyramid_webassets/issues/18\n\n- Fix typo in documentation of ``url_expire`` setting. The setting had been\n spelled (incorrectly) as ``url_expires``. Patch by Greg Kempe.\n See https://github.com/pyramid_webassets/issues/34 .\n\n- Add an example of building assets from the command line.\n\n- Include the MIT License.\n\nBackwards Incompatibilities\n---------------------------\n\n- Support for webassets releases older than v0.8 has been dropped.\n\n- A static view for the configured directory and url is no longer added\n automatically. Set the configuration value ``static_views`` to true to have\n it added when pyramid_webassets is included.\n\n\n",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "http://github.com/sontek/pyramid_webassets",
"keywords": "web wsgi bfg pylons pyramid",
"license": "",
"maintainer": "",
"maintainer_email": "",
"name": "pyramid_webassets",
"package_url": "https://pypi.org/project/pyramid_webassets/",
"platform": "",
"project_url": "https://pypi.org/project/pyramid_webassets/",
"project_urls": {
"Homepage": "http://github.com/sontek/pyramid_webassets"
},
"release_url": "https://pypi.org/project/pyramid_webassets/0.10/",
"requires_dist": [
"pyramid (>=1.4)",
"webassets (>=0.8)",
"zope.interface",
"six (>=1.4.1)",
"PyYAML (>=3.10); extra == 'bundles-yaml'"
],
"requires_python": "",
"summary": "pyramid_webassets",
"version": "0.10"
},
"last_serial": 4448216,
"releases": {
"0.1": [
{
"comment_text": "",
"digests": {
"md5": "84bd8b8d91755ea2ab1c0cfb45382da8",
"sha256": "0121f24d3a09a4e9a7796f14acdde66e8f9c27d653b076c3bb3c82292ea5c3dc"
},
"downloads": -1,
"filename": "pyramid_webassets-0.1.tar.gz",
"has_sig": false,
"md5_digest": "84bd8b8d91755ea2ab1c0cfb45382da8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2581,
"upload_time": "2012-03-06T19:50:58",
"url": "https://files.pythonhosted.org/packages/8b/e6/aa017adafd0022a2f84c18295a73d5ade897f523e4f54057b036d4ce54c2/pyramid_webassets-0.1.tar.gz"
}
],
"0.10": [
{
"comment_text": "",
"digests": {
"md5": "e99afac568ae43f5b56a82f1052c5b0f",
"sha256": "4789f8f7694b49c7fc39bc38a30b2dd03e4cbabd76d8bb019d39a445447c2aaf"
},
"downloads": -1,
"filename": "pyramid_webassets-0.10-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e99afac568ae43f5b56a82f1052c5b0f",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 13513,
"upload_time": "2018-11-03T20:39:48",
"url": "https://files.pythonhosted.org/packages/7f/4b/2b15614308e4657fc41ff4d40b4b9449da06e66151f1924f40ad612dcc7c/pyramid_webassets-0.10-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "23bb5f920c4d8777d74d91c10ba5bfb3",
"sha256": "d145e7b267ec2a1cf2edfd109f74a8edd7ee01e7196c3f4507925ecf471b46d6"
},
"downloads": -1,
"filename": "pyramid_webassets-0.10.tar.gz",
"has_sig": false,
"md5_digest": "23bb5f920c4d8777d74d91c10ba5bfb3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13753,
"upload_time": "2018-11-03T20:39:49",
"url": "https://files.pythonhosted.org/packages/a6/75/87c76b3582c5999c3c4075f2ba6cf1687a16159778821dac27827752e248/pyramid_webassets-0.10.tar.gz"
}
],
"0.2": [
{
"comment_text": "",
"digests": {
"md5": "edc9de9bc5b80f6070818513b85997b0",
"sha256": "38502d7dbd87758885633fa03e3e18a156c654d91745a82ca0f6a599bdeafa53"
},
"downloads": -1,
"filename": "pyramid_webassets-0.2.tar.gz",
"has_sig": false,
"md5_digest": "edc9de9bc5b80f6070818513b85997b0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4764,
"upload_time": "2012-06-20T19:14:42",
"url": "https://files.pythonhosted.org/packages/39/3d/3b3879f8ddaf9c63a94a256fb44d10ae9f78e5a51676c1b21718abc9e1e1/pyramid_webassets-0.2.tar.gz"
}
],
"0.3": [
{
"comment_text": "",
"digests": {
"md5": "99a8a6b251613fca55167dbe5d989854",
"sha256": "c83dd63f5075510f62c81dd0cabf8f1471d4f32fd3629db1e5405d98721c946f"
},
"downloads": -1,
"filename": "pyramid_webassets-0.3.tar.gz",
"has_sig": false,
"md5_digest": "99a8a6b251613fca55167dbe5d989854",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4790,
"upload_time": "2012-06-20T19:15:52",
"url": "https://files.pythonhosted.org/packages/c9/46/b390a24a5b0270a1b8cbe04ff84da4857615998e9d8540d1276169f3f761/pyramid_webassets-0.3.tar.gz"
}
],
"0.4": [
{
"comment_text": "",
"digests": {
"md5": "0a90569ade96cf17f22d2f00583dbe9b",
"sha256": "c662971083e9fa076882e3cef9d5707849a8f0b1e0eb3f69e5a6547aba22e504"
},
"downloads": -1,
"filename": "pyramid_webassets-0.4.tar.gz",
"has_sig": false,
"md5_digest": "0a90569ade96cf17f22d2f00583dbe9b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4809,
"upload_time": "2012-06-20T19:16:39",
"url": "https://files.pythonhosted.org/packages/ba/46/116081ce6c259aba3f6d3136d5521320c7b16c18860df16a6383ba87ed97/pyramid_webassets-0.4.tar.gz"
}
],
"0.5": [
{
"comment_text": "",
"digests": {
"md5": "ccadad4d288b0ac0dfcd63a93dc12f0c",
"sha256": "f8d19562417d0338baa6a009e6b49f43879ce9fd6ad0e72b812ea7f2e613d251"
},
"downloads": -1,
"filename": "pyramid_webassets-0.5.tar.gz",
"has_sig": false,
"md5_digest": "ccadad4d288b0ac0dfcd63a93dc12f0c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5065,
"upload_time": "2012-06-21T02:30:57",
"url": "https://files.pythonhosted.org/packages/5c/df/70ec7e22951029dfba755e2a111c9e9252eb741824d300d8a6f7bd10902e/pyramid_webassets-0.5.tar.gz"
}
],
"0.6": [
{
"comment_text": "",
"digests": {
"md5": "12449ba27a2c7d0baffee5f4d2af6de3",
"sha256": "3da5e8316854b353d520e098cb2f9ca9c9e816b33c0ad1e71ead528dea1a6060"
},
"downloads": -1,
"filename": "pyramid_webassets-0.6.tar.gz",
"has_sig": false,
"md5_digest": "12449ba27a2c7d0baffee5f4d2af6de3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5203,
"upload_time": "2012-07-17T01:48:59",
"url": "https://files.pythonhosted.org/packages/11/29/3875cca46ceb4599bf1171b99358e710a8a369dbaf2eb690d77d47b9f260/pyramid_webassets-0.6.tar.gz"
}
],
"0.7": [
{
"comment_text": "",
"digests": {
"md5": "68b6700a99cc370f4ed94d7cff80745d",
"sha256": "7ffea61208a71af807af450c2108ee532f5ed64f6a32d2483d857876b97c7696"
},
"downloads": -1,
"filename": "pyramid_webassets-0.7.tar.gz",
"has_sig": false,
"md5_digest": "68b6700a99cc370f4ed94d7cff80745d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5620,
"upload_time": "2012-07-17T03:22:06",
"url": "https://files.pythonhosted.org/packages/53/99/dc50d52853c50970948c78dde78306c9bc7305098908c0505e163fe9dd7b/pyramid_webassets-0.7.tar.gz"
}
],
"0.7.1": [
{
"comment_text": "",
"digests": {
"md5": "eaa5c10563625d40719f94f5c33343ab",
"sha256": "a5922dc5cc3f238b9531d598224c9c4d056fe2e5f6dcf1fcbb09a5ef28de4e27"
},
"downloads": -1,
"filename": "pyramid_webassets-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "eaa5c10563625d40719f94f5c33343ab",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 5675,
"upload_time": "2012-07-22T19:11:11",
"url": "https://files.pythonhosted.org/packages/e0/04/89a68b4c1b1bea02279f0d713316910360c9acbde6345c65fd08ea33974c/pyramid_webassets-0.7.1.tar.gz"
}
],
"0.8": [
{
"comment_text": "",
"digests": {
"md5": "7f35c236858fcd1d94907d686b98eb42",
"sha256": "a168bbdebb9df5e9e0361ab940f73b63cabfbd519ce3125d84dc6f1e4879e34f"
},
"downloads": -1,
"filename": "pyramid_webassets-0.8-py2.py3-none-any.whl",
"has_sig": true,
"md5_digest": "7f35c236858fcd1d94907d686b98eb42",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 18088,
"upload_time": "2014-08-04T22:48:24",
"url": "https://files.pythonhosted.org/packages/99/48/ec72872a226c06baefcca6026561bce82dccf9c273e88a9bc6a9f268da66/pyramid_webassets-0.8-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "d6d141b81b673b5c4420618532d8e721",
"sha256": "4d4b1ca1321e626f5df9653f9acb1be44790e289a5e251443667a035f3c62dd8"
},
"downloads": -1,
"filename": "pyramid_webassets-0.8.tar.gz",
"has_sig": true,
"md5_digest": "d6d141b81b673b5c4420618532d8e721",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13698,
"upload_time": "2014-08-04T22:48:19",
"url": "https://files.pythonhosted.org/packages/bd/da/428b05495044288abcaa91073c37193876419a84b96d3f5896cda3000a47/pyramid_webassets-0.8.tar.gz"
}
],
"0.9": [
{
"comment_text": "",
"digests": {
"md5": "2d1c22bc8fe0d2a8310f315709d9be1b",
"sha256": "4cad1de018fe6a0402dbc1fcb3564a6fb38e635f41b4efdc6ab1da277c17515e"
},
"downloads": -1,
"filename": "pyramid_webassets-0.9-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "2d1c22bc8fe0d2a8310f315709d9be1b",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 18496,
"upload_time": "2014-10-22T00:23:17",
"url": "https://files.pythonhosted.org/packages/5c/b8/bb0dad8b59e0e06b867efa6653055fe111565356a6a8e66dae9ef610e4cd/pyramid_webassets-0.9-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "1fc975dce89a90ad26837656ceef94b6",
"sha256": "8e378a3812606e214ba589c5a7283a3f70799c21b28f9abb3495613e9e0d0d71"
},
"downloads": -1,
"filename": "pyramid_webassets-0.9.tar.gz",
"has_sig": false,
"md5_digest": "1fc975dce89a90ad26837656ceef94b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13818,
"upload_time": "2014-10-22T00:23:14",
"url": "https://files.pythonhosted.org/packages/c3/ed/eb57ebe452ee4b1e644c0f0843b25bffbea2756ef6d289dbf959024262de/pyramid_webassets-0.9.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "e99afac568ae43f5b56a82f1052c5b0f",
"sha256": "4789f8f7694b49c7fc39bc38a30b2dd03e4cbabd76d8bb019d39a445447c2aaf"
},
"downloads": -1,
"filename": "pyramid_webassets-0.10-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "e99afac568ae43f5b56a82f1052c5b0f",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 13513,
"upload_time": "2018-11-03T20:39:48",
"url": "https://files.pythonhosted.org/packages/7f/4b/2b15614308e4657fc41ff4d40b4b9449da06e66151f1924f40ad612dcc7c/pyramid_webassets-0.10-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "23bb5f920c4d8777d74d91c10ba5bfb3",
"sha256": "d145e7b267ec2a1cf2edfd109f74a8edd7ee01e7196c3f4507925ecf471b46d6"
},
"downloads": -1,
"filename": "pyramid_webassets-0.10.tar.gz",
"has_sig": false,
"md5_digest": "23bb5f920c4d8777d74d91c10ba5bfb3",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 13753,
"upload_time": "2018-11-03T20:39:49",
"url": "https://files.pythonhosted.org/packages/a6/75/87c76b3582c5999c3c4075f2ba6cf1687a16159778821dac27827752e248/pyramid_webassets-0.10.tar.gz"
}
]
}