untangle
Converts XML to Python objects
What it is and what it does
untangle is a lightweight XML-to-Python object converter that lets you access XML elements and attributes using Python dot notation instead of XPath or DOM traversal. It parses XML from files, URLs, or strings and automatically groups sibling elements with the same name into lists. Special characters in element names (hyphens, dots, colons) are converted to underscores, so an XML element like `<foo-bar/>` becomes accessible as `foo_bar`.
The package depends on defusedxml for secure parsing and supports Python 3.7 through 3.10. It is designed for straightforward XML reading tasks where you want simple, intuitive access to the document structure without the verbosity of standard XML libraries. However, the project is no longer maintained, meaning no updates or bug fixes will be released.
Use it for:
- Parse configuration files in XML format and access settings via simple dot notation.
- Read RSS or Atom feeds and extract article metadata without writing XPath expressions.
- Convert REST API responses in XML format into navigable Python objects for data extraction.
- Process XML documents where element names contain hyphens or dots that need transparent mapping.
- Build quick prototypes or scripts that consume XML without setting up DOM or SAX parsers.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts XML documents into Python objects with dot-notation access to elements and attributes, handling special characters by substituting them with underscores.
Yes, if you need simple XML parsing for a one-off script or non-critical application and are comfortable with an unmaintained package. The low install friction and permissive license make it easy to adopt. However, avoid it for production systems, security-sensitive applications, or projects requiring ongoing maintenance—consider lxml or xml.etree.ElementTree instead.
Install
untangle on PyPI
pip
pip install untangleuv
uv add untanglepoetry
poetry add untangleInstalling untangle
Before you install
Low install friction with a single runtime dependency on defusedxml. However, the package is abandoned—last release was 1504 days ago—so no maintenance or security updates are forthcoming.
License in practice
MIT license is permissive; you can use, modify, and distribute this package with minimal restrictions, though you must include the original license notice.
Quickstart
pip install untangle
import untangle
obj = untangle.parse('file.xml')
print(obj.root.child['name'])
Requires Python 3.7 or later; defusedxml must be installed as a runtime dependency.
Verify before relying
- Whether the package still works reliably with Python 3.10 despite abandonment and lack of recent testing.
- Whether defusedxml's security updates are sufficient to mitigate XML vulnerabilities in untangle's parsing chain.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.7,<4.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — defusedxml |
| Maintenance | abandoned — 1,504 days since the last release |
| First released | |
| Downloads | 584,862/month — #5,888 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: untangle-1.2.1-py3-none-any.whl
Tags
More Markup packages
PyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
markdown-it-pyA Python markdown parser that converts markdown…
permissive · top 100 on PyPI
beautifulsoup4Beautiful Soup parses HTML and XML documents…
permissive · top 100 on PyPI
et-xmlfileet_xmlfile writes large XML files with minimal…
permissive · top 1,000 on PyPI
tomlkitParses and edits TOML files while preserving…
permissive · top 1,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
dicttoxmlConverts Python dictionaries and other native…
copyleft · top 5,000 on PyPI
xmljsonConverts XML documents to Python dictionaries…
permissive · top 5,000 on PyPI
jxmleaseConverts XML to Python data structures (lists,…
permissive · top 15,000 on PyPI
xml-pythonConverts XML documents into Python objects,…
copyleft · top 5,000 on PyPI
dicttoxml2Converts Python dictionaries and native data…
copyleft · top 15,000 on PyPI
jsonasobj2Converts JSON data into Python objects with…
permissive · top 15,000 on PyPI
xmlformatterFormats and compresses XML documents by…
permissive · top 15,000 on PyPI
xmltodictConverts XML to Python dictionaries and back,…
permissive · top 1,000 on PyPI
attrdictProvides dictionary-like objects that allow…
permissive · top 5,000 on PyPI
xsdataxsdata generates Python dataclasses from XML…
permissive · top 5,000 on PyPI