SigV4 authorizer for requests
Project description
Requests IAMAuth
Use AWS SigV4 authorization with requests.
Accessing an API secured with IAM authorization in AWS API Gateway can be tricky.
This tool uses the built-in authorization strategy in requests
to help you access your secured endpoints.
Installation
pip install requests-iamauth
Usage
import requests
from iamauth import IAMAuth
session = requests.Session()
session.auth = IAMAuth()
session.get('https://abcdef0123.execute-api.us-east-2.amazonaws.com/my/api')
Override the default boto3 session by passing a custom one into the constructor for IAMAuth
:
import boto3
boto3_session = boto3.Session()
session.auth = IAMAuth(boto3_session)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests-iamauth-0.2.0.tar.gz
(12.6 kB
view hashes)