{ "info": { "author": "Atsushi Odagiri", "author_email": "aodagx@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Text Processing", "Topic :: Text Processing :: Markup :: HTML", "Topic :: Text Processing :: Markup :: XML" ], "description": "`flexable` is template engine with simple data structure.\r\nThat is made up of str, unicode, dict, tuple, list and Element.\r\n\r\nusage\r\nmerge structured values to xhtml template.\r\n\r\n>>> t = Template()\r\n>>> t.fromstring(\"
\")\r\n>>> str(t)\r\n'
'\r\n\r\n>>> t.merge('hello')\r\n>>> str(t)\r\n'
hello
'\r\n\r\n>>> t = Template()\r\n>>> t.fromstring(\"
\")\r\n>>> t.merge({'y':['1', '2']})\r\n>>> str(t)\r\n'
12
'\r\n\r\n>>> t = Template()\r\n>>> t.fromstring(\"
\")\r\n>>> t.merge({'y':[({'@id':'m1'}, '1'), \r\n... ({'@id':'m2'}, '2')]})\r\n>>> str(t)\r\n'
12
'\r\n\r\n>>> t.fromstring(\"
\")\r\n>>> t.merge({'box':[{'x':'1', 'y':'2'},\r\n... {'x':'3', 'y':'4'}]})\r\n>>> str(t)\r\n'
12
34
'\r\n\r\n>>> t.fromstring(\"
\")\r\n>>> t.merge(ET.Element('span'))\r\n>>> str(t)\r\n'
'\r\n\r\nTo use flexable as template engine for wsgi application, you can use\r\nflexable.plugin:FlexablePlugin.\r\nAnd that is python.template_engine entry point.\r\n\r\nExample on TurboGears\r\n\r\ncontrollers.py::\r\n\r\n @expose(template=\"flexable:flexable_example.templates.example\")\r\n def example(self):\r\n return dict(message=\"This is flexable message.\",\r\n contents=\"\"\" This is main contents from controller.\r\nflexable is merge values to given html template with class attribute.\r\n\"\"\")\r\n\r\nflexable_example/templates/example.html::\r\n\r\n <?xml version=\"1.0\"?>\r\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <body>\r\n <h1>Flexable Template</h1>\r\n <span class=\"message\"></span>\r\n <p class=\"contents\"></p>\r\n <span class=\"widget\"/>\r\n </body>\r\n </html>\r\n\r\nyou get:\r\n\r\n <html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n <body>\r\n <h1>Flexable Template</h1>\r\n <span class=\"message\">This is flexable message.</span>\r\n <p class=\"contents\"> This is main contents from controller.\r\n flexable is merge values to given html template with class attribute.\r\n </p>\r\n </body>\r\n </html>", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": "wsgi template xml", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "flexable", "package_url": "https://pypi.org/project/flexable/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/flexable/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/flexable/0.3dev/", "requires_dist": null, "requires_python": null, "summary": "Template engine with simple data structure", "version": "0.3dev" }, "last_serial": 792062, "releases": { "0.1.1dev": [ { "comment_text": "", "digests": { "md5": "d6be8f07cffa36c09f6fb652b14f4716", "sha256": "8f40a2416a9770baf8e15a02be0fe5e8a2d41012e4e2525d5164e647c99ed340" }, "downloads": -1, "filename": "flexable-0.1.1dev-py2.5.egg", "has_sig": false, "md5_digest": "d6be8f07cffa36c09f6fb652b14f4716", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 7889, "upload_time": "2007-06-16T15:09:02", "url": "https://files.pythonhosted.org/packages/4b/2d/eecfbafe05860e232152c92e2a104b8ac39859ddbc2f2b0a940f65567128/flexable-0.1.1dev-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "01d25d1ee4712e9ef07dd460c5e31a78", "sha256": "1e6f4ea252d0a1b92dfb4b6e145e06ef21be8e7c05b6032097c784517b962169" }, "downloads": -1, "filename": "flexable-0.1.1dev.tar.gz", "has_sig": false, "md5_digest": "01d25d1ee4712e9ef07dd460c5e31a78", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3534, "upload_time": "2007-06-16T15:08:59", "url": "https://files.pythonhosted.org/packages/1c/78/d32612ef08db009bad949a1fe30cb580ff9bfe0bbb3f9c780dd37243d491/flexable-0.1.1dev.tar.gz" } ], "0.2dev": [ { "comment_text": "", "digests": { "md5": "d4b97f99f2782287d4855081a8e4639c", "sha256": "dd44cde1dd3df8bfe661bd7953913ea95a1c39c6cd05d1eae2e86d5d3ccd07c5" }, "downloads": -1, "filename": "flexable-0.2dev-py2.5.egg", "has_sig": false, "md5_digest": "d4b97f99f2782287d4855081a8e4639c", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 9807, "upload_time": "2007-06-22T08:57:14", "url": "https://files.pythonhosted.org/packages/33/62/3b39798cfcf337856345732ffa2e06f03f9afdebb319f37cabeaf0cf8c13/flexable-0.2dev-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "3b064ebb83ccba93965d9ff711b50230", "sha256": "57894ece9e1d32a7f2c3d32118941122a107ad2dab0e05e0c2ed6569ad447e4b" }, "downloads": -1, "filename": "flexable-0.2dev.tar.gz", "has_sig": false, "md5_digest": "3b064ebb83ccba93965d9ff711b50230", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5468, "upload_time": "2007-06-22T08:57:09", "url": "https://files.pythonhosted.org/packages/04/bb/812a73e9f26a085897752a6f9f1222d08d9f7c4160e984aaa5d5af6932c0/flexable-0.2dev.tar.gz" } ], "0.3dev": [ { "comment_text": "", "digests": { "md5": "1b363408fca8dc15493933a154f4c688", "sha256": "54d110483ef497d61e2091832f7f03986012714372da21c4102825c9c556cf60" }, "downloads": -1, "filename": "flexable-0.3dev-py2.5.egg", "has_sig": false, "md5_digest": "1b363408fca8dc15493933a154f4c688", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 12873, "upload_time": "2007-07-18T10:24:13", "url": "https://files.pythonhosted.org/packages/8f/c2/ee3b9e3f16e95137271be6e5f1183cb022c2014501b015ec08fbded3a526/flexable-0.3dev-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "96dbe22524fe9bda2fd84ccfbc0ab9e3", "sha256": "f203fc8ab86c8568bf417c6e87f38e350c435365a595f377a46f2629b67c5c1c" }, "downloads": -1, "filename": "flexable-0.3dev.tar.gz", "has_sig": false, "md5_digest": "96dbe22524fe9bda2fd84ccfbc0ab9e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6246, "upload_time": "2007-07-18T10:24:12", "url": "https://files.pythonhosted.org/packages/a0/56/427ee394c48cf675ba43714ce1514e1596f219fc50be9d7b4ca5d9b735a3/flexable-0.3dev.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1b363408fca8dc15493933a154f4c688", "sha256": "54d110483ef497d61e2091832f7f03986012714372da21c4102825c9c556cf60" }, "downloads": -1, "filename": "flexable-0.3dev-py2.5.egg", "has_sig": false, "md5_digest": "1b363408fca8dc15493933a154f4c688", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 12873, "upload_time": "2007-07-18T10:24:13", "url": "https://files.pythonhosted.org/packages/8f/c2/ee3b9e3f16e95137271be6e5f1183cb022c2014501b015ec08fbded3a526/flexable-0.3dev-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "96dbe22524fe9bda2fd84ccfbc0ab9e3", "sha256": "f203fc8ab86c8568bf417c6e87f38e350c435365a595f377a46f2629b67c5c1c" }, "downloads": -1, "filename": "flexable-0.3dev.tar.gz", "has_sig": false, "md5_digest": "96dbe22524fe9bda2fd84ccfbc0ab9e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6246, "upload_time": "2007-07-18T10:24:12", "url": "https://files.pythonhosted.org/packages/a0/56/427ee394c48cf675ba43714ce1514e1596f219fc50be9d7b4ca5d9b735a3/flexable-0.3dev.tar.gz" } ] }