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-3/

{
  "context": "Evaluates how well the solution uses dicttoxml to convert product records into an inventory XML feed with configurable element naming, metadata, CDATA handling, and output format. Focuses solely on correct dicttoxml option usage rather than general Python structure.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Root and items",
      "description": "Calls dicttoxml.dicttoxml with custom_root=\"inventory\" and an item_func (or equivalent override) so products are emitted as <product> nodes under the inventory root.",
      "max_score": 20
    },
    {
      "name": "ID annotations",
      "description": "Maps the with_ids flag to the ids parameter of dicttoxml.dicttoxml so sequential id attributes appear only when requested.",
      "max_score": 20
    },
    {
      "name": "Type metadata",
      "description": "Toggles attr_type in dicttoxml.dicttoxml based on include_types to include or remove type attributes on elements.",
      "max_score": 20
    },
    {
      "name": "CDATA option",
      "description": "Uses the cdata parameter of dicttoxml.dicttoxml tied to use_cdata so text values are wrapped in CDATA when enabled and entity-escaped otherwise.",
      "max_score": 20
    },
    {
      "name": "Output format",
      "description": "Controls return_bytes (and xml_declaration when returning bytes) in dicttoxml.dicttoxml according to as_bytes so callers receive the requested bytes or string form with the declaration preserved for bytes.",
      "max_score": 20
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-dicttoxml

tile.json