Skip to main content

Supports item (int, float, bool, str, unicode, datetime, none) and collection (list, set, tuple and dict) data types with arbitrary nesting for the collections. Items with a datetime type are converted to ISO format strings. Items with a none type become empty XML elements.

The root object passed into the dicttoxml function can be any of the supported data types.

To satisfy XML syntax, the method wraps all the dict keys/elements and values in a <root> … </root> element. However, this can be disabled to create XML snippets.

For lists of items, if each item is also a collection data type (lists, dict), the elements of that item are wrapped in a generic <item> … </item> element.

Each elements includes a type attribute with the data type. Note: datetime data types are converted into ISO format strings, and unicode and datetime data types get a str attribute.

Python -> XML integer int float float string str unicode str datetime str None null boolean bool list list set list tuple list dict dict

Elements with an unsupported data type raise a TypeError exception.

Metadata

Release files for dicttoxml 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dicttoxml 1.1.1
File Size Uploaded
dicttoxml-1.1.1.tar.gz 3.0 kB Details

Release files / dicttoxml-1.1.1.tar.gz

Download URL dicttoxml-1.1.1.tar.gz
Size 3.0 kB
Tags Source
SHA-256 checksum
How to use checksums
adda38ca1eb8f58a9f1bcb5494d286214ec503cd0e6ed4c288a9c8230e6c0098
BLAKE2b-256 checksum
How to use checksums
aab41c76d9481230d109ac82a0eced8a9e07f5051a55d379daf373574456e9c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

1.7.16

2 release files

1.7.13

2 release files

1.7.12

2 release files

1.7.11

2 release files

1.7.10

1 release file

1.7.9

2 release files

1.7.8

2 release files

1.7.7

2 release files

1.7.6

2 release files

1.7.5

2 release files

1.7.4

1 release file

1.7.3

1 release file

1.7.2

1 release file

1.7.1

1 release file

1.7

1 release file

1.6.6

1 release file

1.6.4

1 release file

1.6.3

1 release file

1.6.2

1 release file

1.6.1

1 release file

1.6.0

1 release file

1.5.9

1 release file

1.5.8

1 release file

1.5.7

1 release file

1.5.6

1 release file

1.5.5

1 release file

1.5.4

1 release file

1.5.3

1 release file

1.5.2

1 release file

1.5.1

1 release file

1.5

1 release file

1.4

1 release file

1.3.7

1 release file

1.3.6

1 release file

1.3.5

1 release file

1.3.4

1 release file

1.3.1

1 release file

1.3

1 release file

1.2

1 release file

1.1.2

1 release file

This release

1.1.1 This release

1 release file

1.1

1 release file

1.0

0.9.1

0.9

0.8

0.7

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page