Converts a Python dictionary or other native data type into a valid XML string. Version 2.1.0 supports Python 3.7+. Active development with infrequent releases.
pip install dicttoxml2No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Convert a dict to XML bytes; set attr_type=False to omit type attributes.
Use .decode('utf-8') on the result.Pass attr_type=False to suppress type annotations.
Either wrap list in a dict with a root key, or use custom_root to define a root element name.
Install and import from dicttoxml2: pip install dicttoxml2 and from dicttoxml2 import dicttoxml
Ensure you decode the XML bytes before passing to string-only functions: xml_string = dicttoxml(data).decode('utf-8')Use a valid XML element name: start with letter or underscore, no spaces.
No dependency data recorded yet.