{ "info": { "author": "chrono-meter@gmx.net", "author_email": "chrono-meter@gmx.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: Python Software Foundation License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Text Processing :: Markup :: HTML", "Topic :: Text Processing :: Markup :: XML" ], "description": "katagami: a simple xml/html template library\n============================================\n\nThis library is one of many `Python templating libraries\n`_.\n\n\nFeatures\n--------\n * Based on XML's Processing instructions (``)\n * Simple features and simple implementation\n * Python script inside XML/HTML with any level indentation\n * `Inline Python expression`_\n * `Embed Python script`_\n * `Block structure`_\n * Supports both of Python 2 and Python 3\n * As fast as `mako `_\n * Iteratable output\n\n\nExample\n-------\n\nMake a HTML string with `inline Python expression`_ and Python's `for` (`Block\nstructure`_)::\n\n >>> from katagami import render_string, myprint\n >>> myprint(render_string('''\n ... \n ... \n ...

hello,

\n ... \n ... \n ... ''', {'names': ['world', 'python']}))\n \n \n \n

hello, world

\n \n

hello, python

\n \n \n \n\n\nInline Python expression\n------------------------\n\nThis feature evaluates your inline expression and output to result::\n\n >>> myprint(render_string('''\n ... \n ... '''))\n \n hello, world\n \n\nBy the default, this example raises an exception, evaluated expression must be\n`str` (`unicode` in Python 2)::\n\n >>> myprint(render_string('''\n ... \n ... ''')) #doctest: +IGNORE_EXCEPTION_DETAIL\n Traceback (most recent call last):\n ...\n TypeError: Can't convert 'int' object to str implicitly\n\nSet the `cast_string` feature::\n\n >>> myprint(render_string('''\n ... \n ... '''))\n \n 1\n \n\nAlso set the `except_hook` feature::\n\n >>> myprint(render_string('''\n ... \n ... '''))\n \n Can't convert 'int' object to str implicitly\n \n\n\nEmbed Python script\n-------------------\n\nAll indentation will be arranged automatically::\n\n >>> myprint(render_string('''\n ... \n ... \n ...

\n ... \n ...

\n ... \n ... \n ...

\n ... \n ... \n ... '''))\n \n \n \n

message from indented script

\n \n

message from single line script

\n \n \n

message from nested indented script

\n \n \n \n\n\nBlock structure\n---------------\n\nIndentation with C-style block structure::\n\n >>> myprint(render_string('''\n ... \n ...

hello, \n ... \n ... \n ... \n ... NameError\n ... \n ... never output here\n ... \n ...

\n ... \n ... '''))\n \n \n

hello, \n \n \n NameError\n \n

\n \n \n\nNote\n~~~~\n\n * '' are wrong. Don't insert space. '' are correct.\n * Ending colon (':') is required.\n * Block closing '' is required.\n\n\nEncoding detection\n------------------\n\nEncoding will be detected automatically::\n\n >>> myprint(render_string(b'''\n ... \n ... \\x93\\xfa\\x96{\\x8c\\xea\n ... '''))\n \n \n \\u65e5\\u672c\\u8a9e\n \n\nSupported formats:\n\n * \n * \n * \n\n\nHistory\n-------\n\n * 2.0.1 improve backward compatibility of the test\n * 2.0.0 change a lot and add some features\n * 1.1.0 change api, add except_handler, add shorthand of gettext (),\n some fixes\n * 1.0.3 fix ignoring `encoding` argument, fix indent bug, add `renderString`\n * 1.0.2 improve doctest compatibility, some fixes\n * 1.0.1 fix bugs, docs, speed\n * 1.0.0 remove backward compatibility", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://pypi.python.org/pypi/katagami", "keywords": null, "license": "PSF", "maintainer": null, "maintainer_email": null, "name": "katagami", "package_url": "https://pypi.org/project/katagami/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/katagami/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://pypi.python.org/pypi/katagami" }, "release_url": "https://pypi.org/project/katagami/2.0.1/", "requires_dist": null, "requires_python": null, "summary": "katagami: a simple xml/html template library", "version": "2.0.1" }, "last_serial": 1025145, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a29284198edaf77e247383b0450399a0", "sha256": "a14cb99359c8101698e393dfe6644407d1326036ec1290f35cbc200fc5116a27" }, "downloads": -1, "filename": "katagami-0.1.0.zip", "has_sig": false, "md5_digest": "a29284198edaf77e247383b0450399a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14852, "upload_time": "2011-08-24T23:05:28", "url": "https://files.pythonhosted.org/packages/70/b2/2ef8a1e3bfc85ccf2e4ebaa733d6ed2013e9d7048f22abedc4a726f528a7/katagami-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "6caadefa0833e3ff5e6e24c9862dab5d", "sha256": "b8498d93cdf8bc41c59d0ac9e3120a18e24e452d967b4598e3902c33d6681802" }, "downloads": -1, "filename": "katagami-0.1.1.zip", "has_sig": false, "md5_digest": "6caadefa0833e3ff5e6e24c9862dab5d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15146, "upload_time": "2011-08-25T22:55:11", "url": "https://files.pythonhosted.org/packages/4e/26/d8cd9605ba26b28338e84e0e52f4fbd61ccf7e373192727016760fd4562c/katagami-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "08f657c7448d52c3e4379b93a45a6541", "sha256": "be93e5e1043d25f6712092db90324244779b09117e376b7de109cbeb65860084" }, "downloads": -1, "filename": "katagami-0.1.2.zip", "has_sig": false, "md5_digest": "08f657c7448d52c3e4379b93a45a6541", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15346, "upload_time": "2011-08-28T02:19:41", "url": "https://files.pythonhosted.org/packages/4c/78/3fdf75f2875dcf2e8cd164def2a00efab66f77f52a050229b275fc6b783d/katagami-0.1.2.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "3edec9af911eae9060c75c012124e584", "sha256": "2a2d99307830510a569785764df1bd8df11e9f22f6a37f170e658b89a9e19e4f" }, "downloads": -1, "filename": "katagami-0.2.0.zip", "has_sig": false, "md5_digest": "3edec9af911eae9060c75c012124e584", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15628, "upload_time": "2011-08-28T20:16:20", "url": "https://files.pythonhosted.org/packages/d8/98/90a3fb0b7578a764512deacfe64f53bdf94888e43cc36a92521e8482ba3b/katagami-0.2.0.zip" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "32753e32a4821d4a8f9f9528ce3b6129", "sha256": "77f00b084b50f1dd530cc29295018b8f01294fc48b1b2567da4fd276c5c07f1d" }, "downloads": -1, "filename": "katagami-0.3.0.zip", "has_sig": false, "md5_digest": "32753e32a4821d4a8f9f9528ce3b6129", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18203, "upload_time": "2011-11-18T20:06:54", "url": "https://files.pythonhosted.org/packages/dd/37/236050c8a01484c799d1b26f8ec90760476ad966a43d021204c7675a86b6/katagami-0.3.0.zip" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "fdb9c982ed430fb9dd8689fda0fcd283", "sha256": "c8005ebad137744caf08ee743590723758e1162cef90ead8b5b8368d5080ca70" }, "downloads": -1, "filename": "katagami-1.0.0.zip", "has_sig": false, "md5_digest": "fdb9c982ed430fb9dd8689fda0fcd283", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7490, "upload_time": "2012-12-30T01:47:54", "url": "https://files.pythonhosted.org/packages/65/cc/ddec7f3fc28b1fd372399c818fd99cdb6074712bb41d0392781235ccd171/katagami-1.0.0.zip" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ae3c3c9d46179ff9d2ef58830c0c1a21", "sha256": "1db517999be75bcf4b9f6a68175aa7c1f362b76e3b9c12a822bd73a168f8bd96" }, "downloads": -1, "filename": "katagami-1.0.1.zip", "has_sig": false, "md5_digest": "ae3c3c9d46179ff9d2ef58830c0c1a21", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7741, "upload_time": "2012-12-31T09:58:35", "url": "https://files.pythonhosted.org/packages/29/e2/aa003c0559ad1fee7c7a3c83a7957163621abdfe840c9b6759146ccfc934/katagami-1.0.1.zip" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "787d4b902950d47e5fbd97eb8b64c4b0", "sha256": "3ad3554cfce906827b2b29c9f21531ded50bf77237cf6fcde4b6f23db1016548" }, "downloads": -1, "filename": "katagami-2.0.0.zip", "has_sig": false, "md5_digest": "787d4b902950d47e5fbd97eb8b64c4b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10176, "upload_time": "2013-08-07T07:47:17", "url": "https://files.pythonhosted.org/packages/df/27/2c2b1b862d481af66183268bfc5d2434ea3ca714a3ae456d42ad0da2ad35/katagami-2.0.0.zip" } ], "2.0.1": [ { "comment_text": "", "digests": { "md5": "0efa5d640e6bdf6c3a3bae53d8aaaf8a", "sha256": "74c2cd3f714e5b7ae19f92fa6ef058a2fcb0176db2b567102d8437bb76997b0b" }, "downloads": -1, "filename": "katagami-2.0.1.zip", "has_sig": false, "md5_digest": "0efa5d640e6bdf6c3a3bae53d8aaaf8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11114, "upload_time": "2014-03-10T16:58:04", "url": "https://files.pythonhosted.org/packages/f3/89/14617867dc632070fa86e8f7068c3f3e99fbbe85f10ba01a1a5bd67c80a1/katagami-2.0.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0efa5d640e6bdf6c3a3bae53d8aaaf8a", "sha256": "74c2cd3f714e5b7ae19f92fa6ef058a2fcb0176db2b567102d8437bb76997b0b" }, "downloads": -1, "filename": "katagami-2.0.1.zip", "has_sig": false, "md5_digest": "0efa5d640e6bdf6c3a3bae53d8aaaf8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11114, "upload_time": "2014-03-10T16:58:04", "url": "https://files.pythonhosted.org/packages/f3/89/14617867dc632070fa86e8f7068c3f3e99fbbe85f10ba01a1a5bd67c80a1/katagami-2.0.1.zip" } ] }