tessl install tessl/pypi-aws-requests-auth@0.4.0AWS 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%
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.
Properly formats URI paths with URL encoding.
Formats query strings by sorting parameters alphabetically. Assumes parameters are already URL-encoded.
@generates
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
"""
passProvides AWS signature version 4 signing process for the python requests module.
@satisfied-by