Repository navigation
v1.0.0 - Production Release
SafeXML 1.0.0 - Memory-Safe, Ultra-Fast Defused XML Parser
SafeXML is a high-performance, memory-safe, drop-in replacement for Python's defusedxml and xml.etree.ElementTree, backed by a streaming Rust engine (quick-xml and PyO3).
Highlights
- 100% Drop-in Parity: Drop-in compatible with
defusedxml.ElementTreeandxml.etree.ElementTree(fromstring,parse,iterparse,XML,tostring,indent,defuse_stdlib). - Defusedxml Issue Fixes:
- Resolves tiran/defusedxml#105: Exception args populated for Rich / IPython traceback formatters.
- Resolves tiran/defusedxml#87: Full
indent()support. - Resolves tiran/defusedxml#78:
fromstring(..., parser=None)support. - Resolves tiran/defusedxml#79:
register_namespace()alias. - Resolves tiran/defusedxml#80:
Element&SubElementexports. - Resolves tiran/defusedxml#104: PEP 561 typing marker (
py.typed).
- Multi-core Scaling: Releases Python GIL during Rust parsing via
py.detach(|| ...). - Target Platform: Exclusively Python >= 3.12. Prebuilt ABI3 wheels for Linux (x86_64, aarch64), macOS (arm64, x86_64), and Windows (x64).
Installation
pip install safexml