skillfed

data-to-xml

A simple dict to xml converter

data-to-xml v1.0.14 177.2K downloads/30d#10,220 on PyPI0
License unclear 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) Active released

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-xml

uv

uv add data-to-xml

poetry

poetry add data-to-xml

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseLicense :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

dict to xml converterpython dictionary xml serializationlist to xml conversiondata structure xml outputjson-like to xmlpython object xml export
serializationxml-generation

More Markup packages