skillfed

dicttoxml2

Converts a Python dictionary or other native data type into a valid XML string.

dicttoxml2 v2.1.0 119.2K downloads/30d#12,085 on PyPI7
Copyleft license GPL-2.0 Abandoned released

What it is and what it does

dicttoxml2 is a lightweight library that serializes Python dictionaries and other native data types into XML strings. It is a maintained fork of the original dicttoxml, updated to support Python 3.7 and forward while dropping support for end-of-life Python versions. The package has no external runtime dependencies, making installation straightforward.

The library is intended as a drop-in replacement for the original dicttoxml. It supports Python 3.7, 3.8, 3.9, 3.10, and 3.11 according to its classifiers and is marked as production-stable. However, the package has been abandoned since 2022-08-13 with no commits or releases since that date, meaning it will not receive updates for new Python versions or bug fixes.

Use it for:

  • Serialize application configuration stored in Python dicts to XML format for interoperability with XML-based systems
  • Convert REST API response data (typically dict-like) to XML for clients that require XML output
  • Generate XML documents programmatically from nested Python data structures without writing XML by hand
  • Export structured data from Python applications to XML files for archival or data interchange

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Converts Python dictionaries and native data types into valid XML strings with no external runtime dependencies.

Yes, if you need simple dict-to-XML conversion and are running Python 3.7–3.11 without plans to upgrade soon. The low install friction and lack of dependencies make it lightweight. However, the GPL-2.0 copyleft license restricts use in proprietary projects, and the package's abandonment since 2022-08-13 means no future maintenance or Python version support—consider this a stable but frozen tool suitable only for stable, unchanging environments.

Install

dicttoxml2 on PyPI

pip

pip install dicttoxml2

uv

uv add dicttoxml2

poetry

poetry add dicttoxml2

Installing dicttoxml2

Before you install

Low install friction with no runtime dependencies. Package is abandoned as of 2022-08-13 with no commits since; relies on stable Python 3.7+ support.

License in practice

Released under GPL-2.0 (copyleft). Any derivative work or distribution must also be licensed under GPL-2.0 and include source code; this may restrict use in proprietary projects.

Quickstart

pip install dicttoxml2

import dicttoxml2
xml = dicttoxml2.dicttoxml({'key': 'value'})

Verify before relying

  • Whether the package handles edge cases in dict-to-XML conversion (nested structures, special characters, type coercion) as expected
  • Whether abandonment since 2022-08-13 means compatibility issues have emerged with Python 3.10+ in real-world use

Package facts

License GPL-2.0 (copyleft)
Python support supports the current Python release (>=3.7, <4)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance abandoned — 1,462 days since the last release
Last repo commit
First released
Downloads 119,152/month — #12,085 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dicttoxml2-2.1.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

dict to xml conversionpython dictionary xml serializationconvert dict to xmlxml generation from python objectsdictionary xml encoder
serializationxml-generationabandoned

More Markup packages