Metadata-Version: 2.4
Name: polyxml
Version: 0.9.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Typing :: Typed
Requires-Dist: pytest>=8.0.0 ; extra == 'dev'
Requires-Dist: pytest-cov>=5.0.0 ; extra == 'dev'
Requires-Dist: pydantic>=2.7.0 ; extra == 'dev'
Requires-Dist: ruff>=0.4.0 ; extra == 'dev'
Requires-Dist: msgspec>=0.18.0 ; extra == 'dev'
Requires-Dist: msgspec>=0.18.0 ; extra == 'msgpack'
Provides-Extra: dev
Provides-Extra: msgpack
Summary: High-performance, polyglot XML data-binding engine built in Rust
Author-email: Bailey Nguyen <bailey.tan.nguyen@gmail.com>
License: MIT
Requires-Python: >=3.12
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://nth-bailey.github.io/PolyXML/
Project-URL: Homepage, https://github.com/nth-bailey/PolyXML
Project-URL: Issues, https://github.com/nth-bailey/PolyXML/issues
Project-URL: Repository, https://github.com/nth-bailey/PolyXML

# PolyXML Python Bindings

High-performance native XML data-binding engine for Python dataclasses and Pydantic models.

Powered by `polyxml-core` written in Rust and PyO3 (`abi3-py312`).

## Features

- **⚡ Blazing Fast**: 16x faster deserialization and 38x faster serialization than standard Python tools.
- **🌊 Streaming `iterparse()`**: Parse multi-gigabyte XML files with O(1) constant memory (<5 MB RAM).
- **📦 Zero-GIL Binary Serialization**: Native `dumps_binary()` and `loads_binary()` using MessagePack (`msgspec`), up to 12.4x faster than pickle.
- **🎯 Full Type Support**: Dataclasses and Pydantic v2 models with zero boilerplate.

## Quickstart

```python
from dataclasses import dataclass, field
import polyxml

@dataclass
class Item:
    id: int = field(metadata={"type": "Attribute"})
    name: str = field(metadata={"type": "Element"})

# 1. XML Deserialization
item = polyxml.deserialize(b'<Item id="1"><name>Gadget</name></Item>', Item)

# 2. XML Serialization
xml = polyxml.serialize(item, indent=2)

# 3. High-Speed Binary Serialization (Key-Value databases / IPC)
blob = polyxml.dumps_binary(item)
restored = polyxml.loads_binary(blob, Item)
```

