Skip to main content

A fast and lightweight library for converting XML to a Python dictionary.

Project description

fastxmltodict

fastxmltodict is a lightweight and fast library for converting XML into a Python dictionary.

Installation

You can install the library using pip:

pip install fastxmltodict

Usage

Example of converting XML to a dictionary:

from fastxmltodict import parse

xml_data = """
<note>
    <to>John</to>
    <from>Jane</from>
    <message>Hello, World!</message>
</note>
"""

result = parse(xml_data)
print(result)

Output:

{
    "note": {
        "to": "John",
        "from": "Jane",
        "message": "Hello, World!"
    }
}

Features

  • Recursive XML to dictionary conversion
  • Support for element attributes
  • Easy to use

License

This project is licensed under the MIT License. You are free to use, modify, and distribute it under the terms of this license.

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

fastxmltodict-1.24.1.tar.gz (501.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastxmltodict-1.24.1-py3-none-any.whl (503.2 kB view details)

Uploaded Python 3

File details

Details for the file fastxmltodict-1.24.1.tar.gz.

File metadata

  • Download URL: fastxmltodict-1.24.1.tar.gz
  • Upload date:
  • Size: 501.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for fastxmltodict-1.24.1.tar.gz
Algorithm Hash digest
SHA256 3c66194b8809033b3b303ef4ebc57e11d9e5ecb72ef2d9e9e6e105d14a111d63
MD5 cb36e206d577349d90c89a291863bc95
BLAKE2b-256 7e5b2c160720ada4a3d1f00950908be9361648c93bc4fa02935e03b6e27f8e31

See more details on using hashes here.

File details

Details for the file fastxmltodict-1.24.1-py3-none-any.whl.

File metadata

  • Download URL: fastxmltodict-1.24.1-py3-none-any.whl
  • Upload date:
  • Size: 503.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for fastxmltodict-1.24.1-py3-none-any.whl
Algorithm Hash digest
SHA256 29f47226efa9f68b08aefe5a5cfe6e8d521dc735d5da659b9a7f5e405493f702
MD5 d642c52f2e18cee24e2e3e17612923fd
BLAKE2b-256 274cfe6ce251c2edfb1e1d38f4e0dc0979f24792d1e13589df2d2352dff6a21d

See more details on using hashes here.

Supported by

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