{ "info": { "author": "Daren Thomas", "author_email": "daren.thomas@gmx.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.5", "Topic :: Text Processing :: Markup :: HTML", "Topic :: Text Processing :: Markup :: XML" ], "description": "Creating tree structures like those used for HTML and XML should be dead easy.\nThe xml.etree.ElementTree library goes quite far in creating a simple to use library\nfor creating and modifying such structures. I'd like to go a step further, building\non top of ElementTree::\n\n from magictree import html, head, title, body, h1, p\n doc = html(\n head(\n title('Chapter 1: Greeting')),\n body(\n h1('Chapter 1: Greeting'),\n p('Hello, world!')))\n\n from xml.etree import ElementTree as et \n et.dump(doc)\n\nResults in this: (added some whitespace for formatting)\n\n::\n\n \n \n Chapter 1: Greeting\n \n \n

Chapter 1: Greeting

\n

Hello, world!

\n \n \n\nThis works by replacing this module with a wrapper object in sys.modules that\ncreates factory functions for elements based on their name.\n\nI used this page as a basis for the hack: http://stackoverflow.com/questions/2447353/getattr-on-a-module", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/pymagictree/", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "magictree", "package_url": "https://pypi.org/project/magictree/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/magictree/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/pymagictree/" }, "release_url": "https://pypi.org/project/magictree/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "Easily create ElementTree with automatic Element factories", "version": "1.0.0" }, "last_serial": 794453, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "6ab5c6cca99b2dd2cd2f5f887f9734c5", "sha256": "16a57095f24c846aa2a30cb1bf64aa93224e4b9438079a218e6c663f03bf555d" }, "downloads": -1, "filename": "magictree-1.0.0.win32.exe", "has_sig": false, "md5_digest": "6ab5c6cca99b2dd2cd2f5f887f9734c5", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 65194, "upload_time": "2011-07-06T16:46:37", "url": "https://files.pythonhosted.org/packages/a2/ba/3580c3dccff3323b2db4a9dfc67da810c9fd5273ef2a3902827b7ffc19df/magictree-1.0.0.win32.exe" }, { "comment_text": "", "digests": { "md5": "685e25d6dc37cf306eeccf7ab1815c73", "sha256": "4b1c5817378347f0b94b78ac138e6ae86342895f9f45e69afe9cd1b13f2877d6" }, "downloads": -1, "filename": "magictree-1.0.0.zip", "has_sig": false, "md5_digest": "685e25d6dc37cf306eeccf7ab1815c73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3772, "upload_time": "2011-07-06T16:46:37", "url": "https://files.pythonhosted.org/packages/10/cf/b3d48d02d7e673fb4ff28ca4c96743ac710dc70180943995b5d3420efbc0/magictree-1.0.0.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6ab5c6cca99b2dd2cd2f5f887f9734c5", "sha256": "16a57095f24c846aa2a30cb1bf64aa93224e4b9438079a218e6c663f03bf555d" }, "downloads": -1, "filename": "magictree-1.0.0.win32.exe", "has_sig": false, "md5_digest": "6ab5c6cca99b2dd2cd2f5f887f9734c5", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 65194, "upload_time": "2011-07-06T16:46:37", "url": "https://files.pythonhosted.org/packages/a2/ba/3580c3dccff3323b2db4a9dfc67da810c9fd5273ef2a3902827b7ffc19df/magictree-1.0.0.win32.exe" }, { "comment_text": "", "digests": { "md5": "685e25d6dc37cf306eeccf7ab1815c73", "sha256": "4b1c5817378347f0b94b78ac138e6ae86342895f9f45e69afe9cd1b13f2877d6" }, "downloads": -1, "filename": "magictree-1.0.0.zip", "has_sig": false, "md5_digest": "685e25d6dc37cf306eeccf7ab1815c73", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3772, "upload_time": "2011-07-06T16:46:37", "url": "https://files.pythonhosted.org/packages/10/cf/b3d48d02d7e673fb4ff28ca4c96743ac710dc70180943995b5d3420efbc0/magictree-1.0.0.zip" } ] }