{ "info": { "author": "Alexander Juda", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Web Environment", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Topic :: Text Processing :: Markup :: HTML" ], "description": "# piccup\n\n\n\n\n**[EXPERIMENTAL]**\n\nRender HTML from Python using plain data structures, inspired by Clojure's Hiccup.\n\n## Installation\n\n```\npip install piccup\n```\n\n## Usage\n\npiccup allows you to write HTML using plain Python data structures.\n\n```python\n>>> p.html(['p', 'hello'])\n'
hello
'\n```\n\nEach HTML node is defined using `[element, attributes, contents]` triple. `element` string is required, `attributes` dict and `contents` object are optional.\n\n```python\n>>> p.html(['a',\n {'href': 'http://example.com'}, \n 'Click Me'])\n'Click Me'\n```\n\nNested HTML nodes are passed to `contents`.\n\n```python\n>>> p.html(['ul', \n [['li', 'first'], \n ['li', 'second'], \n ['li', 'third']]])\n'