Skip to main content

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

Project description

Dict to XML

Download Count Total

Converts a Python dictionary or other native data type into a valid XML string. This is a fork that support Python 3.9 and forward versions and drop all EOL (<=3.6) versions altogether. It is mostly backward-compatible, act as a drop-in replacement.

Installation

This module should work in Python 3.7+. The dicttoxml module is published on the Python Package Index, so you can install it using pip.

pip install dicttoxml2

That should be all you need to do.

Basic Usage

Once installed, import the library into your script and convert a dict into xml by running the dicttoxml function:

>>> import dicttoxml2
>>> xml = dicttoxml2.dicttoxml(some_dict)

Alternately, you can import the dicttoxml() function from the library.

>>> from dicttoxml2 import dicttoxml
>>> xml = dicttoxml(some_dict)

That's it!

Author

Maintainer

Copyright and Licence

Copyright 2012 by Ryan McGreal.

Released under the GNU General Public Licence, Version 2:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dicttoxml2-2.1.0.tar.gz (22.7 kB view details)

Uploaded Source

Built Distribution

dicttoxml2-2.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file dicttoxml2-2.1.0.tar.gz.

File metadata

  • Download URL: dicttoxml2-2.1.0.tar.gz
  • Upload date:
  • Size: 22.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for dicttoxml2-2.1.0.tar.gz
Algorithm Hash digest
SHA256 67cb729f337dd752808c021b70c8df8a34f84b9e111a5dbaa37e000eeaf4d462
MD5 787ea4b80cd6234a41c016e8efa7ff40
BLAKE2b-256 0b247a6d37b2770843e34685e470fd711955cb0f77c354c73d8ca64b02420bce

See more details on using hashes here.

File details

Details for the file dicttoxml2-2.1.0-py3-none-any.whl.

File metadata

  • Download URL: dicttoxml2-2.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.6

File hashes

Hashes for dicttoxml2-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b58df16e614f09f100536b51f2ac1345652cfb44c89c2d7c2be685e2e32e03c6
MD5 adef69fb04366e9aea0a4b250f543680
BLAKE2b-256 ba0f2cbc69586728aab2bb7b82315423298eb96dfd2fb751ee88430585c55fdb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page