Skip to main content

Supports item (int, float, bool, str, unicode, datetime, none) and collection (list, set, tuple and dict, as well as iterable and dict-like objects) 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.3.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.3.1
File Size Uploaded
dicttoxml-1.3.1.tar.gz 3.1 kB Details

Release files / dicttoxml-1.3.1.tar.gz

Download URL dicttoxml-1.3.1.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
355dd621d8f65a13122eea438c3c82c56b10cd73b18ab9bbad1eb57ede606d4e
BLAKE2b-256 checksum
How to use checksums
2f759aefc035ad0c8bb2227904678032b10a9162db9a5ee2172ac40b253b8b02
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

This release

1.3.1 This release

1 release file

1.3

1 release file

1.2

1 release file

1.1.2

1 release file

1.1.1

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