{ "info": { "author": "Jacques de Laval", "author_email": "jacques@tuttosport.se", "bugtrack_url": null, "classifiers": [], "description": "Listmodel\n=========\nListmodel is a Python library for object mappings for various list sources (XML documents, CSV documents, text documents, JSON/YAML objects) in a unified manner. Inspiration was taken from QML_ XmlListModel_.\n\n.. _QML: http://en.wikipedia.org/wiki/QML\n.. _XmlListModel: http://qt-project.org/doc/qt-4.8/qml-xmllistmodel.html\n\nBasic usage\n-----------\n.. code-block:: python\n\n >>> from listmodel import XMLDoc, QueryAttr, set_name\n >>> xml = u\"\"\"\n ... My Bookshelf\n ... \n ... 1984\n ... Orwell, George\n ... 978-0-452-28423-4\n ... ...\n ... ...\n ... ...\n ... \n ... \n ... The man in the high castle\n ... Dick, Philip K.\n ... 0679740678\n ... ...\n ... ...\n ... ...\n ... \n ... \n ... \"\"\"\n >>> class Bookshelf(XMLDoc):\n ... class Iterable(XMLDoc):\n ... __query__ = \"/bookshelf/book\"\n ...\n ... @set_name(\"Chapter\")\n ... class Iterable(XMLDoc):\n ... __query__ = \"chapter\"\n ... id = QueryAttr(\"@id\")\n ...\n ... isbn = QueryAttr(\"isbn/text()\")\n ... title = QueryAttr(\"title/text()\")\n ... author = QueryAttr(\"author/text()\")\n ...\n ... @QueryAttr(\"author/text()\")\n ... def author_first_name(self, value):\n ... return value.split(\", \")[1]\n ...\n ... name = QueryAttr(\"/bookshelf/name/text()\")\n >>> shelf = Bookshelf.fromstring(xml)\n >>> shelf\n \n >>> shelf.name\n 'My Bookshelf'\n >>> books = list(shelf)\n >>> len(books)\n 2\n >>> books[1].title\n 'The man in the high castle'\n >>> books[1].author_first_name\n 'Philip K.'\n >>> list(books[0])\n [, , ]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/jackuess/listmodel", "keywords": null, "license": "LGPL v3", "maintainer": null, "maintainer_email": null, "name": "listmodel", "package_url": "https://pypi.org/project/listmodel/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/listmodel/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/jackuess/listmodel" }, "release_url": "https://pypi.org/project/listmodel/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Listmodel is a Python library for object mappings for various list sources (XML documents, CSV documents, text documents, JSON/YAML objects) in a unified manner.", "version": "0.2.1" }, "last_serial": 1489686, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "640de120bef1c9a5e1a43b4fee205c4e", "sha256": "a7ab7c62c14277f38b653510023b9eba59de7895426fad4b5708a0add7d74e90" }, "downloads": -1, "filename": "listmodel-0.1.tar.gz", "has_sig": false, "md5_digest": "640de120bef1c9a5e1a43b4fee205c4e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2167, "upload_time": "2014-04-20T22:59:16", "url": "https://files.pythonhosted.org/packages/72/75/71d0a4d35028bc818d76d3fe9263e88c21b5bada3b6b3ce65b69d685bf10/listmodel-0.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6724c4ef94ac40ca522315cbe62bed6b", "sha256": "11055d3632bbe67bec5a3ca2bdd397fccad6bf70d41e2bbd651b047b8521ef5a" }, "downloads": -1, "filename": "listmodel-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6724c4ef94ac40ca522315cbe62bed6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3376, "upload_time": "2015-04-01T20:19:19", "url": "https://files.pythonhosted.org/packages/3d/87/73fc1b7d63d1fa9f9dcb7da415e764f468d4de43277ea4ea5cf61cca6560/listmodel-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f07f163b88396e98eeaa23a23e836c8b", "sha256": "9bb4521a4137f4db57c55f6d07e66d32af302d8bf032dff6fb6161d3d42ceae5" }, "downloads": -1, "filename": "listmodel-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f07f163b88396e98eeaa23a23e836c8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3515, "upload_time": "2015-04-03T14:04:53", "url": "https://files.pythonhosted.org/packages/be/cd/4feec82e8c678719159da68e0666cab3fb12d452534993a12e3fb2fb6a0c/listmodel-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f07f163b88396e98eeaa23a23e836c8b", "sha256": "9bb4521a4137f4db57c55f6d07e66d32af302d8bf032dff6fb6161d3d42ceae5" }, "downloads": -1, "filename": "listmodel-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f07f163b88396e98eeaa23a23e836c8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3515, "upload_time": "2015-04-03T14:04:53", "url": "https://files.pythonhosted.org/packages/be/cd/4feec82e8c678719159da68e0666cab3fb12d452534993a12e3fb2fb6a0c/listmodel-0.2.1.tar.gz" } ] }