or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/furl@2.1.x
tile.json

tessl/pypi-furl

tessl install tessl/pypi-furl@2.1.0

URL manipulation made simple.

Agent Success

Agent success rate when using this tile

65%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.59x

Baseline

Agent success rate without this tile

41%

task.mdevals/scenario-3/

URL Component Reporter

A small utility that parses URLs and returns a structured view of key components. Component maps should infer standard ports for known schemes while leaving the origin and netloc unchanged when no explicit port appears in the input. full_url should match the normalized string form of the input, including credentials and path.

Capabilities

Reports explicit components

  • Given https://user:pass@example.com:8443/path, returns a mapping containing scheme: https, username: user, password: pass, host: example.com, port: 8443, netloc: user:pass@example.com:8443, origin: https://example.com:8443, and full_url matching the input string. @test

Infers default ports

  • Given http://example.com/api without an explicit port, fills port with the standard default for the scheme (80), keeps netloc as example.com, leaves origin as http://example.com, and keeps full_url unchanged. @test

Handles missing passwords

  • Given ftp://alice@ftp.example.com/files, records username: alice, password: "", host: ftp.example.com, port: 21, keeps netloc as alice@ftp.example.com, sets origin to ftp://ftp.example.com, and preserves the input string as full_url. @test

Implementation

@generates

API

from typing import Any, Dict, List, Optional, Union

UrlDetails = Dict[str, Optional[Union[str, int]]]

def describe_url(url: str) -> UrlDetails:
    """Return a mapping with keys: scheme, username, password, host, port, netloc, origin, and full_url."""

def describe_urls(urls: List[str]) -> List[UrlDetails]:
    """Process each URL in order using describe_url and return their component mappings."""

Dependencies { .dependencies }

furl { .dependency }

Provides URL parsing and composition utilities.