CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-aws-requests-auth

AWS signature version 4 signing process for the python requests module

84

1.10x
Overview
Eval results
Files

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer uses the aws-requests-auth package to integrate AWS Signature Version 4 authentication with the Python requests library. The focus is on correct instantiation of authentication objects, proper integration with requests methods, and reusability of auth instances.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "AWSRequestsAuth instantiation",
      "description": "Creates an instance of AWSRequestsAuth class with correct parameters: aws_access_key, aws_secret_access_key, aws_host (host parameter), aws_region (region parameter), and aws_service='es' for Elasticsearch",
      "max_score": 25
    },
    {
      "name": "Auth integration (GET)",
      "description": "Uses the AWSRequestsAuth instance as the auth parameter in requests.get() call for the check_elasticsearch_health function (e.g., requests.get(url, auth=auth_instance))",
      "max_score": 20
    },
    {
      "name": "Auth integration (POST)",
      "description": "Uses the AWSRequestsAuth instance as the auth parameter in requests.post() call for the update_index function (e.g., requests.post(url, auth=auth_instance, json=document))",
      "max_score": 20
    },
    {
      "name": "Auth reusability",
      "description": "Demonstrates proper reuse of authentication objects by creating auth instances that can be used across multiple requests rather than recreating auth for each request unnecessarily",
      "max_score": 15
    },
    {
      "name": "Correct URL construction",
      "description": "Constructs complete URLs correctly using https:// protocol with the host parameter for AWS Elasticsearch endpoints (e.g., f'https://{host}/_cluster/health')",
      "max_score": 10
    },
    {
      "name": "Response handling",
      "description": "Properly extracts and returns data from the response object returned by authenticated requests (e.g., response.json() for GET, response.status_code for POST)",
      "max_score": 10
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-aws-requests-auth

tile.json