{ "info": { "author": "Magnus Hallin", "author_email": "mhallin@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Django", "Framework :: Django :: 1.7", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Software Development :: Compilers" ], "description": "=========================\n Django-compiling-loader\n=========================\n\nA template loader that compiles Django templates into Python bytecode\nfor improved performance.\n\n.. image:: https://api.travis-ci.org/mhallin/django-compiling-loader.svg?branch=master\n :target: https://travis-ci.org/mhallin/django-compiling-loader\n\n.. image:: https://coveralls.io/repos/mhallin/django-compiling-loader/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/mhallin/django-compiling-loader?branch=master\n\n----\n\nThis package exposes the ``compiling_loader.Loader`` template\nloader. This loader will compile the template syntax tree generated by\nDjango into Python bytecode. If a tag can't be generated, a fallback\nwill be compiled, which just evaluates the template nodes. The\nfallback method means that this loader is compatible with the existing\nloaders, even if you have a lot of custom tags.\n\nThe compiler is modular and built around Python 3.4's\n``singledispatch`` function, meaning that it can easily be extended to\nsupport your own tags if you have expensive custom tags that would\nbenefit from compilation.\n\nThe loader itself does not do any caching; it works together with\nDjango's built-in cached loader to avoid recompilation.\n\n\nUsage\n=====\n\nInstall the ``django-compiling-loader`` Python package and set the\n``TEMPLATE_LOADERS`` settings to the following value:\n\n.. code-block:: python\n\n TEMPLATE_LOADERS = (\n ('django.template.loaders.cached.Loader', [\n ('compiling_loader.Loader', [\n 'django.template.loaders.filesystem.Loader',\n 'django.template.loaders.app_directories.Loader',\n ]),\n ]),\n )\n\nIf you have other loaders, put them inside the\n``compiling_loader.Loader`` list to ensure that the generated\ntemplates get compiled.\n\n\nCompatibility\n=============\n\nThe loader has been tested with Django 1.7, and requires Python\n3.4. When it comes to rendering compatibility, this project contains a\nfair number of test cases that compare the render output from the\nstandard Django template evaluation and this compiler. So far, no\nincompatibilities have been found.\n\n\nPerformace\n==========\n\nThe ``test_proj/run_benchmarks.py`` script renders a small inheritance\nbased template a large number of times, as well as a large both\ninheritance and include based template a few times. Below are some\ncomparisons:\n\n========= ======= ======== =======\nTemplate Default Compiled Speedup\n========= ======= ======== =======\nSmall 0.21 ms 0.10 ms 2,1x\nLarge 125 ms 42 ms 3,0x\n========= ======= ======== =======", "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/mhallin/django-compiling-loader", "keywords": "django performance template", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-compiling-loader", "package_url": "https://pypi.org/project/django-compiling-loader/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-compiling-loader/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mhallin/django-compiling-loader" }, "release_url": "https://pypi.org/project/django-compiling-loader/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "A bytecode compiling template loader for Django", "version": "0.0.1" }, "last_serial": 1641220, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "dc894596cabf7b9259a0f9a776a7eea7", "sha256": "f55f5a47544edbe39b97e6a1d2681846abdbdb50d60531f2310935e20df948b5" }, "downloads": -1, "filename": "django_compiling_loader-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dc894596cabf7b9259a0f9a776a7eea7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16455, "upload_time": "2015-07-20T10:44:04", "url": "https://files.pythonhosted.org/packages/3c/ba/b741f62817af66eca3ca14f01c3a267ec972470e12108507ae54f3c06528/django_compiling_loader-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7ae922930ac4d751f2961ff20cdba0c", "sha256": "141fac2ff24e0139876ccd5db918ceee9228632e96dbefed49c131081392abef" }, "downloads": -1, "filename": "django-compiling-loader-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f7ae922930ac4d751f2961ff20cdba0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10760, "upload_time": "2015-07-20T10:44:00", "url": "https://files.pythonhosted.org/packages/cc/eb/f10e26543caf2fbd571eec07a5aa6a78aa85f182a0687a4ad5ebce7ab1b7/django-compiling-loader-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "dc894596cabf7b9259a0f9a776a7eea7", "sha256": "f55f5a47544edbe39b97e6a1d2681846abdbdb50d60531f2310935e20df948b5" }, "downloads": -1, "filename": "django_compiling_loader-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "dc894596cabf7b9259a0f9a776a7eea7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16455, "upload_time": "2015-07-20T10:44:04", "url": "https://files.pythonhosted.org/packages/3c/ba/b741f62817af66eca3ca14f01c3a267ec972470e12108507ae54f3c06528/django_compiling_loader-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f7ae922930ac4d751f2961ff20cdba0c", "sha256": "141fac2ff24e0139876ccd5db918ceee9228632e96dbefed49c131081392abef" }, "downloads": -1, "filename": "django-compiling-loader-0.0.1.tar.gz", "has_sig": false, "md5_digest": "f7ae922930ac4d751f2961ff20cdba0c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10760, "upload_time": "2015-07-20T10:44:00", "url": "https://files.pythonhosted.org/packages/cc/eb/f10e26543caf2fbd571eec07a5aa6a78aa85f182a0687a4ad5ebce7ab1b7/django-compiling-loader-0.0.1.tar.gz" } ] }