{
"info": {
"author": "Juniper Networks",
"author_email": "jxmlease@juniper.net",
"bugtrack_url": null,
"classifiers": [
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 2",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.2",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Text Processing :: Markup :: XML"
],
"description": "jxmlease\n========\n\nWelcome to jxmlease: a Python module for converting XML to\nintelligent Python data structures, and converting Python data\nstructures to XML.\n\nWhat is jxmlease?\n-----------------\n\nDo you have a requirement to process XML data, but find it cumbersome\nto process XML data in Python? If so, you are not alone.\n\nThe main problem with processing XML data in Python is that it doesn't\nmap well to native Python data structures. XML contains both data and\nmetadata, while native Python objects (lists, dictionaries, and\nstrings) only contain data.\n\nBut, wait! That's not completely true. Actually, Python objects *do*\nhave the ability to hold metadata. jxmlease subclasses Python list,\ndictionary, and string types to create new, smart XML classes that can\nrepresent the XML data as normal Python objects while also maintaining\nthe metadata for you to use.\n\nFor example, consider this sample XML document::\n\n \n \n foo\n \n \n \n bar\n \n \n \n baz\n \n \n\nUsing jxmlease, you can get a standard Python representation of the\n*data* in this XML document::\n\n >>> root = jxmlease.parse(xml)\n >>> root.prettyprint()\n {u'a': {u'b': {u'z': u'foo'},\n u'c': {u'd': {u'z': u'bar'}},\n u'e': {u'z': u'baz'}}}\n\nYou can also still access the *metadata*::\n\n >>> root['a']['b']['z'].get_xml_attr(\"changed\")\n u'true'\n\njxmlease also provides flexibility for parsing your data. If you only\nneed select information from your XML data, you can have jxmlease\nreturn it while it is parsing the document::\n\n >>> for path, _, node in jxmlease.parse(xml, generator=\"z\"):\n ... changed = node.get_xml_attr(\"changed\", None) is not None\n ... print(\"%-8s: %s %s\" % (path, node, \"(changed)\" if changed else \"\"))\n ...\n /a/b/z : foo (changed)\n /a/c/d/z: bar (changed)\n /a/e/z : baz\n\nYou can also iterate over the full, parsed document::\n\n >>> for node in root.find_nodes_with_tag(\"z\"):\n ... changed = node.get_xml_attr(\"changed\", None) is not None\n ... print(\"%s %s\" % (node, \"(changed)\" if changed else \"\"))\n ...\n foo (changed)\n bar (changed)\n baz\n\nThese iterations can even return part of an XML tree::\n\n >>> for node in root.find_nodes_with_tag((\"b\", \"c\")):\n ... print(\"<%s>: %s\" % (node.tag, node))\n ...\n : {u'z': u'foo'}\n : {u'd': {u'z': u'bar'}}\n\nAnd, importantly, these objects are subclasses of Python objects, so\nthings like string comparisons work correctly::\n\n >>> root['a']['b']['z'] == \"foo\"\n True\n >>> root['a']['b']['z'] == \"bar\"\n False\n\nYou can also easily produce XML output from typical Python objects::\n\n >>> print(jxmlease.emit_xml({'a': {'b': 'foo', 'c': 'bar'}}))\n \n \n bar\n foo\n \n\nWe think that these features, and others, combine to ease XML\nprocessing in Python: hence, the name: jxmlease.\n\nDocumentation\n-------------\n\nThe documentation is hosted on `readthedocs`_.\n\n.. _readthedocs: http://jxmlease.readthedocs.org/\n\nInstallation\n------------\n\nSee the `installation instructions`_.\nfor more information on installing jxmlease.\n\n.. _installation instructions: http://jxmlease.readthedocs.org/en/stable/install.html\n",
"description_content_type": null,
"docs_url": null,
"download_url": "UNKNOWN",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/Juniper/jxmlease",
"keywords": null,
"license": "MIT",
"maintainer": null,
"maintainer_email": null,
"name": "jxmlease",
"package_url": "https://pypi.org/project/jxmlease/",
"platform": "all",
"project_url": "https://pypi.org/project/jxmlease/",
"project_urls": {
"Download": "UNKNOWN",
"Homepage": "https://github.com/Juniper/jxmlease"
},
"release_url": "https://pypi.org/project/jxmlease/1.0.1/",
"requires_dist": null,
"requires_python": null,
"summary": "jxmlease converts between XML and intelligent Python data structures.",
"version": "1.0.1"
},
"last_serial": 2070040,
"releases": {
"1.0": [
{
"comment_text": "",
"digests": {
"md5": "01bd4ad4e0e91fa5d65defd9afbced00",
"sha256": "9f8e9fbd7a205e3ef61dbf7654acfe439b19f954cec421a8869572ddff91ded6"
},
"downloads": -1,
"filename": "jxmlease-1.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "01bd4ad4e0e91fa5d65defd9afbced00",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 36838,
"upload_time": "2016-04-12T20:22:27",
"url": "https://files.pythonhosted.org/packages/d3/7b/596ddc42542eecec8dea5c864d6428bcf5f4e85c219bd42bb3d2989fd654/jxmlease-1.0-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "5a0a5fe4bcce502cb494cf45715849bd",
"sha256": "256da0377f8276d55b91adc2640f02569422cfa4bc8eef60eee1b3f73444d577"
},
"downloads": -1,
"filename": "jxmlease-1.0.tar.gz",
"has_sig": false,
"md5_digest": "5a0a5fe4bcce502cb494cf45715849bd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 47608,
"upload_time": "2016-04-12T20:22:21",
"url": "https://files.pythonhosted.org/packages/31/62/20a8925498fa9174eeb4ba2cbbeb6f043ac74035f086bcd967c7a8e88e43/jxmlease-1.0.tar.gz"
}
],
"1.0.1": [
{
"comment_text": "",
"digests": {
"md5": "229818cdde6d3af5d3f4b803e58d7bd1",
"sha256": "c6515c71295ba7752f3215853bc974b3ee646715606944f8667fac4e20257e57"
},
"downloads": -1,
"filename": "jxmlease-1.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "229818cdde6d3af5d3f4b803e58d7bd1",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 37670,
"upload_time": "2016-04-18T18:51:38",
"url": "https://files.pythonhosted.org/packages/61/66/aea1d3ab6c45bc7653a0d31afcc7b38614ee74c4f205622b668aa175726c/jxmlease-1.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "0a9b3655a6fa182c5c1e3c83f0a04d60",
"sha256": "fb04cfd54d8d7e4cc533108750047e9ccf43139c3c0220f8a082274b19564e98"
},
"downloads": -1,
"filename": "jxmlease-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "0a9b3655a6fa182c5c1e3c83f0a04d60",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 49228,
"upload_time": "2016-04-18T18:51:32",
"url": "https://files.pythonhosted.org/packages/80/b3/a1ffc5ea763c84780a9acfaa4f69a98f6c974eaf297e20d9d3648ef7d95b/jxmlease-1.0.1.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "229818cdde6d3af5d3f4b803e58d7bd1",
"sha256": "c6515c71295ba7752f3215853bc974b3ee646715606944f8667fac4e20257e57"
},
"downloads": -1,
"filename": "jxmlease-1.0.1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "229818cdde6d3af5d3f4b803e58d7bd1",
"packagetype": "bdist_wheel",
"python_version": "2.7",
"requires_python": null,
"size": 37670,
"upload_time": "2016-04-18T18:51:38",
"url": "https://files.pythonhosted.org/packages/61/66/aea1d3ab6c45bc7653a0d31afcc7b38614ee74c4f205622b668aa175726c/jxmlease-1.0.1-py2.py3-none-any.whl"
},
{
"comment_text": "",
"digests": {
"md5": "0a9b3655a6fa182c5c1e3c83f0a04d60",
"sha256": "fb04cfd54d8d7e4cc533108750047e9ccf43139c3c0220f8a082274b19564e98"
},
"downloads": -1,
"filename": "jxmlease-1.0.1.tar.gz",
"has_sig": false,
"md5_digest": "0a9b3655a6fa182c5c1e3c83f0a04d60",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 49228,
"upload_time": "2016-04-18T18:51:32",
"url": "https://files.pythonhosted.org/packages/80/b3/a1ffc5ea763c84780a9acfaa4f69a98f6c974eaf297e20d9d3648ef7d95b/jxmlease-1.0.1.tar.gz"
}
]
}