Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/dicttoxml@1.7.x
tile.json

tessl/pypi-dicttoxml

tessl install tessl/pypi-dicttoxml@1.7.0

Converts a Python dictionary or other native data type into a valid XML string.

Agent Success

Agent success rate when using this tile

86%

Improvement

Agent success rate improvement when using this tile compared to baseline

0.99x

Baseline

Agent success rate without this tile

87%

task.mdevals/scenario-2/

XML Debug Logging Utility

Create a helper that converts Python data structures to XML while letting callers direct verbose conversion logs to a specific file. The utility should keep conversions simple for callers who just want XML output, while exposing an opt-in debug switch that streams detailed logging to a chosen path.

Capabilities

Configurable debug log output

  • Given a mapping payload like {"id": 7, "status": "ok"} and a writable log path, converting with debugging enabled returns XML bytes containing the fields and leaves a log file at that path with at least one non-empty line. @test

Quiet mode

  • When the same payload is converted with debugging disabled, XML bytes are still returned, but the log path is untouched (the file is absent or remains empty). @test

Implementation

@generates

API

from pathlib import Path
from typing import Any

def convert_with_logging(payload: Any, log_path: str | Path, *, debug: bool = True) -> bytes:
    """Converts the payload to XML bytes, directing debug output to the chosen log file when enabled."""

Dependencies { .dependencies }

dicttoxml { .dependency }

Provides XML generation and debug logging support for Python objects.

@satisfied-by