Library of web-related functions for HTML manipulation, HTTP processing, URL handling, and encoding detection
84
{
"context": "This evaluation assesses the engineer's ability to use w3lib's URL query parameter manipulation functionality to add or update query parameters in URLs. The focus is specifically on proper usage of the add_or_replace_parameter function for modifying individual URL parameters.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses add_or_replace_parameter",
"description": "Implementation uses w3lib.url.add_or_replace_parameter function to add or update query parameters in URLs",
"max_score": 50
},
{
"name": "Correct parameter updates",
"description": "Correctly uses add_or_replace_parameter to update both session_id and lang parameters, calling the function for each parameter that needs to be modified",
"max_score": 30
},
{
"name": "Preserves URL structure",
"description": "Implementation correctly preserves existing query parameters, URL path, scheme, domain, and other URL components when modifying parameters",
"max_score": 10
},
{
"name": "Correct function signature",
"description": "Function accepts the required parameters (URL string, session_id value, lang value) and returns a modified URL string",
"max_score": 10
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-w3libevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10