Ctrl + K
DocumentationLog inGet started

tessl/pypi-aws-requests-auth

tessl install tessl/pypi-aws-requests-auth@0.4.0

AWS signature version 4 signing process for the python requests module

Agent Success

Agent success rate when using this tile

84%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.11x

Baseline

Agent success rate without this tile

76%

task.mdevals/scenario-1/

AWS Request URI Canonicalizer

Build a utility that canonicalizes AWS request URIs for use in AWS Signature Version 4 authentication. The tool should handle both URI path and query string canonicalization according to AWS specifications.

Capabilities

URI Path Canonicalization

Properly formats URI paths with URL encoding.

  • Simple path "/users/profile" returns "/users/profile" @test
  • Empty path "" returns "/" @test
  • Path with spaces "/search/hello world" returns "/search/hello%20world" @test
  • Path with special characters like + and * are properly escaped @test

Query String Canonicalization

Formats query strings by sorting parameters alphabetically. Assumes parameters are already URL-encoded.

  • Empty query string "" returns "" @test
  • Single parameter "name=John" returns "name=John" @test
  • Multiple parameters "b=2&a=1&c=3" returns "a=1&b=2&c=3" (sorted by parameter name) @test
  • Pre-encoded parameters "key=value%20encoded" are preserved correctly @test

Implementation

@generates

API

def canonicalize_path(path: str) -> str:
    """
    Canonicalizes a URI path according to AWS Signature Version 4 specifications.

    Args:
        path: The URI path to canonicalize

    Returns:
        The canonicalized path with proper URL encoding
    """
    pass

def canonicalize_query_string(query: str) -> str:
    """
    Canonicalizes a query string according to AWS Signature Version 4 specifications.
    Assumes query parameters are already URL-encoded.

    Args:
        query: The query string to canonicalize (pre-encoded)

    Returns:
        The canonicalized query string with parameters sorted by name
    """
    pass

Dependencies { .dependencies }

aws-requests-auth { .dependency }

Provides AWS signature version 4 signing process for the python requests module.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/aws-requests-auth@0.4.x
tile.json