Skip to main content

xmlpydict 📑

XML Tests PyPI versions PyPI

Installation

To install xmlpydict, using uv:

uv pip install xmlpydict

Quickstart

>>> from xmlpydict import parse
>>> parse("<package><xmlpydict language='python'/></package>")
{'package': {'xmlpydict': {'@language': 'python'}}}
>>> parse("<person name='Matthew'>Hello!</person>")
{'person': {'@name': 'Matthew', '#text': 'Hello!'}}

Goals

Create a consistent parsing strategy between XML and Python dictionaries using the specification found here. xmlpydict focuses on speed; see the benchmarks below.

uv run --extra benchmark benchmark.py

small_xml_document large_xml_document
# Empty tags are containers
>>> from xmlpydict import parse
>>> parse("<a></a>")
{'a': None}
>>> parse("<a/>")
{'a': None}
>>> parse("<a/>").get('href')
None

Attribute prefixing

# Change prefix from default "@" with keyword argument attr_prefix
>>> from xmlpydict import parse
>>> parse('<p width="10" height="5"></p>', attr_prefix="$")
{"p": {"$width": "10", "$height": "5"}}

Exceptions

# Grammar and structure of the xml_content is checked while parsing
>>> from xmlpydict import parse
>>> parse("<a></ a>")
xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 5

Metadata

Release files for xmlpydict 0.0.21

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

Source distribution (sdist)

Source distribution for xmlpydict 0.0.21
File Size Uploaded Provenance Actions
xmlpydict-0.0.21.tar.gz 8.9 kB With provenance Details for xmlpydict-0.0.21.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xmlpydict 0.0.21
File Interpreter ABI Platform Actions
xmlpydict-0.0.21-cp313-cp313-manylinux1_x86_64.manylinux_2_34_x86_64.manylinux_2_5_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.5+ x86-64, Linux glibc 2.34+ x86-64 Details for xmlpydict-0.0.21-cp313-cp313-manylinux1_x86_64.manylinux_2_34_x86_64.manylinux_2_5_x86_64.whl

Total release size: 89.7 kB

Release files / xmlpydict-0.0.21.tar.gz

Download URL xmlpydict-0.0.21.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c096debfd8dec39c82419283aeb121a1f90d623f560a31715e8e3eea1a3025f2
BLAKE2b-256 checksum
How to use checksums
c88e49c1f2e397931e4fd674f07fb88cb23fe90b5ac6f9e2f2dc70bb1df00a8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Release files / xmlpydict-0.0.21-cp313-cp313-manylinux1_x86_64.manylinux_2_34_x86_64.manylinux_2_5_x86_64.whl

Download URL xmlpydict-0.0.21-cp313-cp313-manylinux1_x86_64.manylinux_2_34_x86_64.manylinux_2_5_x86_64.whl
Size 80.8 kB
Tags CPython 3.13 Linux glibc 2.34+ x86-64 Linux glibc 2.5+ x86-64
SHA-256 checksum
How to use checksums
311c3082956fe4ad1fdf5d98e57412a4e30e992d21945e34f3da8c77b85b1cc6
BLAKE2b-256 checksum
How to use checksums
b61655f1c9fb41ae24d1586e33fb15dbbce131438c2f12648b759d3e4d066863
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

Security for xmlpydict 0.0.21

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for xmlpydict-0.0.21.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 1, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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