data-to-xml
A simple dict to xml converter
What it is and what it does
data-to-xml is a lightweight Python library that transforms dictionaries and lists into XML format. It takes Python data structures as input and produces valid XML output, making it useful for scenarios where you need to serialize structured data to XML without writing manual XML construction code.
The package has no runtime dependencies, installs cleanly, and supports modern Python versions (3.11, 3.12, 3.13) on both CPython and PyPy. It is marked as Production/Stable and has been actively maintained since its initial release.
Use it for:
- Export configuration dictionaries to XML format for legacy systems or XML-based APIs.
- Convert JSON-like Python data structures to XML for data interchange with XML-dependent tools.
- Serialize application state or structured data to XML files for archival or transmission.
- Transform API response data (typically dict-based) into XML for downstream XML processors.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Converts Python dictionaries and lists into XML documents with configurable structure and formatting.
Yes. The package is lightweight, dependency-free, actively maintained, dual-licensed under permissive terms, and solves a straightforward problem. Install it if you need dict-to-XML conversion and can work with Python 3.11+. No known security issues.
Install
data-to-xml on PyPI
pip
pip install data-to-xmluv
uv add data-to-xmlpoetry
poetry add data-to-xmlInstalling data-to-xml
Before you install
Installs with no dependencies and maintains active development. Last release 89 days ago with recent commits.
License in practice
Dual-licensed under BSD-3-Clause and Mozilla Public License 2.0. Both are permissive open-source licenses; you may choose which terms apply to your use.
Quickstart
pip install data-to-xml
from data_to_xml import dict_to_xml
data = {'root': {'item': 'value'}}
xml_string = dict_to_xml(data)
Requires Python 3.11 or later.
Verify before relying
- Whether the converter handles nested structures, attributes, and mixed content types as expected for your use case.
- Performance characteristics when converting large or deeply nested data structures.
- Availability and completeness of documentation beyond the GitHub examples directory.
Package facts
| License | Dual License: All software and documentation is distributed under "BSD 3-Clause License" AND "Mozilla Public License Version 2.0" ================================== BSD 3-Clause License… (full text in the JSON record) (unclear) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 89 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 177,206/month — #10,220 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: data_to_xml-1.0.14-py3-none-any.whl
Keywords: data, dict, xml, list, dict, structure, convert, dictionary, dict-to-xml, dict to xml
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
pytest-xmlA pytest plugin that generates XML output from…
unclear · top 15,000 on PyPI
xmltojsonConverts XML documents to JSON format via a…
permissive · top 15,000 on PyPI
dict2xmlConverts Python dictionaries into XML strings…
permissive · top 5,000 on PyPI
xml-pythonConverts XML documents into Python objects,…
copyleft · top 5,000 on PyPI
pytest-jsonA pytest plugin that generates JSON reports of…
permissive · top 15,000 on PyPI
soup2dictConverts BeautifulSoup4 parsed HTML or XML…
permissive · top 15,000 on PyPI
dicttoxml2Converts Python dictionaries and native data…
copyleft · top 15,000 on PyPI
pytest-item-dictA pytest plugin that builds hierarchical…
unclear · top 15,000 on PyPI
dicttoxmlConverts Python dictionaries and other native…
copyleft · top 5,000 on PyPI
json2htmlConverts JSON data structures into HTML tables…
permissive · top 5,000 on PyPI