tessl install tessl/github-python--cpython@3.13.0CPython is the reference implementation of the Python programming language providing the core interpreter, runtime system, and comprehensive standard library.
Agent Success
Agent success rate when using this tile
96%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.07x
Baseline
Agent success rate without this tile
90%
A small utility that fetches HTTP or HTTPS responses while merging query parameters, respecting basic limits, and reporting the final response details.
Content-Length exceeds the limit. @test@generates
from dataclasses import dataclass
from typing import Mapping, Optional
class SnapshotError(Exception):
"""Raised for any fetch-related failures."""
@dataclass
class SnapshotResult:
final_url: str
status: int
headers: Mapping[str, str]
body: str
def fetch_snapshot(
url: str,
query: Optional[Mapping[str, str]] = None,
headers: Optional[Mapping[str, str]] = None,
max_bytes: Optional[int] = None,
timeout: float = 5.0,
redirect_limit: int = 3,
) -> SnapshotResult:
"""
Fetches text content over HTTP/HTTPS while merging query parameters, enforcing an optional size guard, following redirects, and respecting timeouts.
Raises SnapshotError on failures.
"""Provides built-in HTTP clients, URL parsing, and socket timeout support for network I/O.
@satisfied-by