{ "info": { "author": "Sam et Max", "author_email": "lesametlemax@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Information Technology", "License :: OSI Approved :: GNU General Public License (GPL)", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7" ], "description": "Templite\n==============\n\nA light-weight, fully functional, general purpose Python templating engine that fits in one single file.\n\nI'm not the author, credits go to Thimo Kraemer and Tomer Filiba. You can get the original source here_.\n\nI'm just packaging it and making it available on pypi and github to give it visibility.\n\n(If the authors want the repository ownership, please contact me)\n\nUsage example::\n\n from templite import Templite\n\n template = r\"\"\"\n\n This template demonstrates the usage of Templite.\n\n Within the defined delimiters we can write pure Python code:\n\n ${\n def say_hello(name):\n write('Hello %s!' % name)\n }$\n\n And now we call the function: ${ say_hello('World') }$\n\n Escaped starting delimiter: $\\{\n ${ write('Escaped ending delimiter: }\\$') }$\n\n Also block statements are possible:\n\n ${ if x > 10: }$\n x is greater than 10\n ${ :elif x > 5: }$\n x is greater than 5\n ${ :else: }$\n x is not greater than 5\n ${ :end-if / only the starting colon is essential to close a block }$\n\n ${ for i in range(x): }$\n loop index is ${ i }$\n ${ :end-for }$\n\n ${ # this is a python comment }$\n\n Single variables and expressions starting with quotes are substituted\n automatically:\n Instead ${write(x)}$ you can write ${x}$ or ${'%s' % x}$ or ${\"\", x}$\n Therefore standalone statements like break, continue or pass\n must be enlosed by a semicolon: $\\{continue;}\\$\n\n To include another template, just call \"include\":\n ${ include('template.txt') }$\n \"\"\"\n\n t = Templite(template)\n print t.render(x=8)\n\n\n\n \"\"\"\n\n\nWhich outputs ::\n\n\n This template demonstrates the usage of Templite.\n\n Within the defined delimiters we can write pure Python code:\n\n\n\n And now we call the function: Hello World!\n\n Escaped starting delimiter: ${\n Escaped ending delimiter: }$\n\n Also block statements are possible:\n\n\n x is greater than 5\n\n\n\n loop index is 0\n\n loop index is 1\n\n loop index is 2\n\n loop index is 3\n\n loop index is 4\n\n loop index is 5\n\n loop index is 6\n\n loop index is 7\n\n\n\n\n Single variables and expressions starting with quotes are substituted\n automatically:\n Instead 8 you can write 8 or 8 or 8\n Therefore standalone statements like break, continue or pass\n must be enlosed by a semicolon: ${continue;}$\n\n To include another template, just call \"include\":\n This is the content of template.txt\n.. _here: http://www.joonis.de/en/code/templite", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.joonis.de/en/code/templite", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "templite", "package_url": "https://pypi.org/project/templite/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/templite/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.joonis.de/en/code/templite" }, "release_url": "https://pypi.org/project/templite/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "A light-weight, fully functional, general purpose Python templating engine that fits in one single file.", "version": "0.2.1" }, "last_serial": 1897510, "releases": { "0.1.4": [ { "comment_text": "", "digests": { "md5": "c86f1eba2d94d8946657fde5e1c64476", "sha256": "b577ee90b582fd68808704aa67e529a0007c74fdb87e87e28eb6a7cbe98693c1" }, "downloads": -1, "filename": "templite-0.1.4.tar.gz", "has_sig": false, "md5_digest": "c86f1eba2d94d8946657fde5e1c64476", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11234, "upload_time": "2016-01-09T23:37:59", "url": "https://files.pythonhosted.org/packages/d3/6f/b5a65041e42457f5d87fd8aa010e78e4dd6cd254d994de055334eb488e8a/templite-0.1.4.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "7c4abad2b5bf83ca8401307cba34c1f7", "sha256": "bed976aa50f8a01c35f98e5818c9ea67c2b1ad78b84f7df1bb9e5665dd0b4d16" }, "downloads": -1, "filename": "templite-0.2.tar.gz", "has_sig": false, "md5_digest": "7c4abad2b5bf83ca8401307cba34c1f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11694, "upload_time": "2016-01-10T09:54:50", "url": "https://files.pythonhosted.org/packages/d8/9f/886ded0064699b01f3a32ec6c2dc3b2e49226dfc630688506133f7f3018a/templite-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "c8becd0411a3b9d390d5e403cf84cecf", "sha256": "73c5bb138b4bfd538a9189d9336f16910d2184aa373855f146290aea5e5b42cd" }, "downloads": -1, "filename": "templite-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c8becd0411a3b9d390d5e403cf84cecf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10974, "upload_time": "2016-01-10T10:00:06", "url": "https://files.pythonhosted.org/packages/6f/64/b1ec268f33b649c9206f4a7809a303b274c8308d926724441a4b59fe0c31/templite-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8becd0411a3b9d390d5e403cf84cecf", "sha256": "73c5bb138b4bfd538a9189d9336f16910d2184aa373855f146290aea5e5b42cd" }, "downloads": -1, "filename": "templite-0.2.1.tar.gz", "has_sig": false, "md5_digest": "c8becd0411a3b9d390d5e403cf84cecf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10974, "upload_time": "2016-01-10T10:00:06", "url": "https://files.pythonhosted.org/packages/6f/64/b1ec268f33b649c9206f4a7809a303b274c8308d926724441a4b59fe0c31/templite-0.2.1.tar.gz" } ] }