obj2xml-rs 0.1.1

High-performance, memory-efficient XML generator from Dict for Python, written in Rust.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from ._obj2xml_rs import unparse

import asyncio
from functools import partial


async def unparse_async(*args, **kwargs):
    """
    Asynchronous wrapper for unparse.
    Runs the XML generation in a separate thread to avoid blocking the event loop.
    """
    loop = asyncio.get_running_loop()
    return await loop.run_in_executor(None, partial(unparse, *args, **kwargs))


__all__ = ["unparse", "unparse_async"]