CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-w3lib

Library of web-related functions for HTML manipulation, HTTP processing, URL handling, and encoding detection

84

0.91x
Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "This criteria evaluates how effectively an engineer uses the w3lib package, specifically the add_or_replace_parameters function, to update multiple URL query parameters. The focus is on proper import, correct function usage, and appropriate parameter handling.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Import w3lib.url",
      "description": "Correctly imports the add_or_replace_parameters function from w3lib.url module (e.g., 'from w3lib.url import add_or_replace_parameters')",
      "max_score": 15
    },
    {
      "name": "Use add_or_replace_parameters",
      "description": "Uses the add_or_replace_parameters function as the primary mechanism to update URL parameters, rather than manually parsing and reconstructing URLs",
      "max_score": 30
    },
    {
      "name": "Pass dictionary parameter",
      "description": "Correctly passes the parameters dictionary to add_or_replace_parameters as the second argument, utilizing the function's built-in capability to handle multiple parameters in a single call",
      "max_score": 25
    },
    {
      "name": "Handle parameter addition",
      "description": "Leverages add_or_replace_parameters to add new query parameters to URLs that already have existing parameters, demonstrating understanding that the function preserves existing parameters while adding new ones",
      "max_score": 10
    },
    {
      "name": "Handle parameter replacement",
      "description": "Leverages add_or_replace_parameters to replace existing query parameters, demonstrating understanding that the function updates values when parameter names already exist in the URL",
      "max_score": 10
    },
    {
      "name": "Handle empty query strings",
      "description": "Uses add_or_replace_parameters on URLs without existing query parameters, demonstrating understanding that the function correctly initializes query strings when none exist",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-w3lib

tile.json