{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/3"},{"label":"XML","url":"https://skillfed.io/packages/category/text-processing-markup-xml"}],"enrichment":{"capability":"Pydantic-xml adds XML serialization and deserialization to pydantic models, letting you bind model fields to XML attributes, elements, and text content, then convert between Python objects and XML documents.","skillfed_tags":["xml-serialization","pydantic-extension"],"use_cases":["Parse XML configuration files into typed pydantic models with validation, then serialize changes back to XML.","Consume SOAP or XML-based REST APIs by mapping XML responses to pydantic models automatically.","Build XML document generators where you define the structure as a pydantic model and serialize instances to XML.","Migrate legacy XML-based systems to Python by treating XML as a serialization format for modern typed models.","Validate and transform XML data pipelines using pydantic's rich validation and computed field features."],"what_it_does":"Pydantic-xml is a pydantic extension that bridges Python dataclass-like models and XML documents. It lets you declare a pydantic model with fields that map to XML attributes (via `attr()`), child elements (via `element()`), or text content, then automatically serialize instances to XML or deserialize XML back into typed Python objects. The binding is declarative and integrates with pydantic's type system, so you get validation, optional fields, unions, generics, and computed fields all working with XML.\n\nThe package supports both pydantic v1 and v2, works with standard library `xml.etree.ElementTree` or the faster lxml parser, and handles Python collection types like List, Dict, Set, and Tuple. It does not support pydantic dataclasses or callable discriminators in unions. Most use cases involve APIs or configuration files where XML is the wire format but you want to work with typed Python objects.","worth_installing":"Yes. Low install friction, active maintenance, no known vulnerabilities, permissive license, and solid popularity (top 5000 PyPI packages). Install if you need to work with XML in a pydantic-native way; skip only if you have no XML in your project or prefer a different serialization format."},"id":"pydantic-xml","links":{"html":"https://skillfed.io/packages/pydantic-xml","md":"https://skillfed.io/packages/pydantic-xml.md","pypi":"https://pypi.org/project/pydantic-xml/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-08-08","license_spdx":null,"license_treatment":"permissive","name":"pydantic-xml","python_support":"supports_current","summary":"pydantic xml extension"},"popularity":{"monthly_downloads":2507149,"position":3035,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.21.1"}
