CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-dicttoxml

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

86

0.98x
Overview
Eval results
Files

rubric.jsonevals/scenario-6/

{
  "context": "Evaluates whether the solution uses dicttoxml to build XML payloads with switchable type annotations and per-element id attributes. Checks that the implementation respects the API flags, expected root wrapper, and returns bytes from the library.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "dicttoxml usage",
      "description": "Conversion is performed with a call to dicttoxml.dicttoxml (not manual XML assembly), feeding the provided data structure directly to the library.",
      "max_score": 20
    },
    {
      "name": "Type toggle",
      "description": "The include_types flag drives the attr_type parameter in dicttoxml.dicttoxml so type attributes are suppressed when False and preserved when True.",
      "max_score": 25
    },
    {
      "name": "ID toggle",
      "description": "The include_ids flag drives the ids parameter in dicttoxml.dicttoxml so elements gain unique id attributes only when the flag is True.",
      "max_score": 25
    },
    {
      "name": "Root wrapper",
      "description": "The root_name argument is passed through to dicttoxml.dicttoxml via custom_root (or equivalent) to wrap the document in the requested root tag.",
      "max_score": 15
    },
    {
      "name": "Return bytes",
      "description": "dicttoxml.dicttoxml is invoked with return_bytes=True (or the default is left untouched) and the function returns the resulting bytes without decoding to text.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-dicttoxml

tile.json