{ "info": { "author": "Arve Seljebu", "author_email": "arve.seljebu@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4" ], "description": "objectifiedetree\n================\n\n|build-status-image| |pypi-version| |wheel|\n\nOverview\n--------\n\nWouldn't it be nice to use dot notation for ElementTrees? This package\nallows for:\n\n.. code:: python\n\n tree = ET.fromstring('')\n a = tree.a\n b = a.b\n b.attrib['c'] == \"asdf\" # True\n\n``tree.a`` will be a\n```Element`` `__\nwith the extra\n```__getattr__`` `__\nmethod. This means that you can use the element as you would do\nnormally, but names in your XML that crases with python's methods or\nattributes must be accessed through ``tree.find(xpath)``.\n\nThis package uses the python implementation of etree, which makes it\nslower than etree found in CPython. An alternative would be to\nmonkey-patch the built-in with\n`forbiddenfruit `__, but I\nhaven't looked into this.\n\n``objectifiedetree`` has copied the python implementation of etree from\n`CPython 3.4\nLib/xml/etree `__\nand will probably only work with Python 3.4.\n\nInstallation\n------------\n\nInstall using ``pip``...\n\n.. code:: bash\n\n pip install objectifiedetree\n\nExample\n-------\n\n.. code:: python\n\n from objectifiedetree import *\n\n tree = ET.parse('/path/to/file.xml')\n # dot notation :-)\n el = tree.xpath.to.your.element\n\n # use normal etree attributes\n print(el.attrib)\n\n # access name crashes\n attrib_el = el.find('./attrib')\n\nDevelopment\n-----------\n\nInstall dependencies and link development version of objectifiedetree to\npip:\n\n.. code:: bash\n\n git clone https://github.com/arve0/objectifiedetree\n cd objectifiedetree\n pip install -r requirements.txt # install dependencies and objectifiedetree-package\n\nTesting\n~~~~~~~\n\n.. code:: bash\n\n tox\n\nBuild documentation locally\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nTo build the documentation:\n\n.. code:: bash\n\n pip install -r docs/requirements.txt\n make docs\n\n.. |build-status-image| image:: https://secure.travis-ci.org/arve0/objectifiedetree.png?branch=master\n :target: http://travis-ci.org/arve0/objectifiedetree?branch=master\n.. |pypi-version| image:: https://pypip.in/version/objectifiedetree/badge.svg\n :target: https://pypi.python.org/pypi/objectifiedetree\n.. |wheel| image:: https://pypip.in/wheel/objectifiedetree/badge.svg\n :target: https://pypi.python.org/pypi/objectifiedetree", "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/arve0/objectifiedetree", "keywords": "objectifiedetree", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "objectifiedetree", "package_url": "https://pypi.org/project/objectifiedetree/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/objectifiedetree/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/arve0/objectifiedetree" }, "release_url": "https://pypi.org/project/objectifiedetree/0.0.1/", "requires_dist": null, "requires_python": null, "summary": "Dot notation for ElementTrees", "version": "0.0.1" }, "last_serial": 1551444, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "1c059389b5afedf8edfbb1f39cbe99a0", "sha256": "f8cfdff46c9e78dc7d6c806981733e32c57d29033b828a05021d580788bf37ce" }, "downloads": -1, "filename": "objectifiedetree-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1c059389b5afedf8edfbb1f39cbe99a0", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 25376, "upload_time": "2015-05-18T10:06:50", "url": "https://files.pythonhosted.org/packages/1b/58/7abafae2a0bbe04ffcbccb13d406f25569788cb32ee4d98d526ece6f9ad0/objectifiedetree-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8f1c4dc91b63ceaa504b2c14ce09bf3", "sha256": "4a79af55ca09e0239be4d6c0f85b58e6f96ccf9ca3361799d4f7b2932e1cb672" }, "downloads": -1, "filename": "objectifiedetree-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d8f1c4dc91b63ceaa504b2c14ce09bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27612, "upload_time": "2015-05-18T10:06:43", "url": "https://files.pythonhosted.org/packages/5a/20/d3223783b8e8c4a05bc07615de6e04ab203c6643d7e165c40800c6ae1d8d/objectifiedetree-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1c059389b5afedf8edfbb1f39cbe99a0", "sha256": "f8cfdff46c9e78dc7d6c806981733e32c57d29033b828a05021d580788bf37ce" }, "downloads": -1, "filename": "objectifiedetree-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "1c059389b5afedf8edfbb1f39cbe99a0", "packagetype": "bdist_wheel", "python_version": "3.4", "requires_python": null, "size": 25376, "upload_time": "2015-05-18T10:06:50", "url": "https://files.pythonhosted.org/packages/1b/58/7abafae2a0bbe04ffcbccb13d406f25569788cb32ee4d98d526ece6f9ad0/objectifiedetree-0.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d8f1c4dc91b63ceaa504b2c14ce09bf3", "sha256": "4a79af55ca09e0239be4d6c0f85b58e6f96ccf9ca3361799d4f7b2932e1cb672" }, "downloads": -1, "filename": "objectifiedetree-0.0.1.tar.gz", "has_sig": false, "md5_digest": "d8f1c4dc91b63ceaa504b2c14ce09bf3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27612, "upload_time": "2015-05-18T10:06:43", "url": "https://files.pythonhosted.org/packages/5a/20/d3223783b8e8c4a05bc07615de6e04ab203c6643d7e165c40800c6ae1d8d/objectifiedetree-0.0.1.tar.gz" } ] }