tedder / requests-aws4auth

Amazon Web Services version 4 authentication for the Python Requests module
MIT License
179 stars 63 forks source link

Passing in keyword arguments leads to a TypeError #70

Open ysabri opened 1 year ago

ysabri commented 1 year ago

This if statement chain fails when keyword arguments are used for the region and service.

Code looks like this:

AWS4Auth(credentials.access_key, 
                   credentials.secret_key, 
                   region='us-east-1', 
                   service='aoss', 
                   session_token=credentials.token)
mrapacz commented 8 months ago

Just stumbled upon this. I'd expect one of these scenarios to happen:

  1. Minimal effort - I'd expect this TypeError to have a message mentioning that using keyword arguments may cause this package to fail.
  2. Just a little bit more effort - I'd expect the code to handle keyword arguments and compute the l variable based on both args and kwargs.