types-xmltodict
Typing stubs for xmltodict
What it is and what it does
This is a type stub package that ships type annotations for xmltodict, a library that converts XML into Python dictionaries. Type stubs allow static type checkers to understand the types and signatures of xmltodict's functions and classes without modifying the original library. When you install this package alongside xmltodict and a type checker like mypy or pyright, the checker can validate that your code is calling xmltodict correctly and handling the returned data with the right types.
The stubs are maintained as part of typeshed, the central repository of type information for Python packages. This version targets xmltodict 1.0.1 and has been tested with mypy 2.1.0 and pyright 1.1.409. Since it contains no runtime code, installation adds no overhead to your application—it only helps during development and CI type-checking phases.
Use it for:
- Enable mypy or pyright to catch type errors in code that uses xmltodict.parse() and related functions
- Provide IDE autocomplete and inline type hints when working with xmltodict in a modern editor
- Enforce type safety in XML parsing workflows without modifying the xmltodict library itself
- Support CI/CD pipelines that run static type checks on projects using xmltodict
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type annotations for the xmltodict package, enabling static type checkers like mypy and pyright to validate code that parses XML into Python dictionaries.
Yes, if you use xmltodict and run static type checking. Installing this stub package is free and adds no runtime cost, and it immediately enables your type checker to validate xmltodict usage. If you don't use a type checker or don't use xmltodict, there's no reason to install it.
Install
types-xmltodict on PyPI
pip
pip install types-xmltodictuv
uv add types-xmltodictpoetry
poetry add types-xmltodictInstalling types-xmltodict
Before you install
Low friction installation with no runtime dependencies. Maintained as part of the active typeshed project with recent updates; last commit on 2026-08-14.
License in practice
Apache-2.0 permissive license allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install types-xmltodict
# In your code using xmltodict:
import xmltodict
data: dict = xmltodict.parse('<root><item>value</item></root>')
Requires Python 3.10 or later; type checker (mypy, pyright, etc.) must be installed separately to use the stubs.
Verify before relying
- Whether this stub package is automatically discovered by type checkers or requires explicit configuration
- Coverage completeness for all xmltodict APIs in the targeted version range
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,433,550/month — #3,907 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_xmltodict-1.0.1.20260518-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-defusedxmlProvides type hints for the defusedxml library,…
permissive · top 5,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
xmltodictConverts XML to Python dictionaries and back,…
permissive · top 1,000 on PyPI
types-polibProvides type stubs for the polib package,…
permissive · top 15,000 on PyPI
types-html5libProvides type hints for the html5lib HTML…
permissive · top 5,000 on PyPI
types-simplejsonProvides type annotations for the simplejson…
permissive · top 5,000 on PyPI
types-MarkdownProvides type stubs for the Markdown package,…
permissive · top 5,000 on PyPI
types-psutilProvides type annotations for the psutil…
permissive · top 5,000 on PyPI
types-jmespathProvides type annotations for the jmespath…
permissive · top 5,000 on PyPI
xmltojsonConverts XML documents to JSON format via a…
permissive · top 15,000 on PyPI