Skip to main content

Library for making sigv4 requests to AWS API endpoints

Project description

# requests-sigv4

Python library for making AWS4-HMAC-SHA256 signed calls with requests.

### Usage
---------

```python
from requests_sigv4 import Sigv4Request

request = Sigv4Request(region="us-west-2")
response = request.get(
url='{}/pets/1234'.format(API_PATH),
headers={'X-Custom-Header': 'foo-bar'},
)
```

```python
# Constructor options.
# role_arn can be provided to STS with the current credential context.
Sigv4Request(
region=None,
access_key=None,
secret_key=None,
session_token=None,
session_expires=3600,
profile=None,
role_arn=None,
role_session_name='awsrequest',
service='execute-api')
```

### AWS Credentials
-------------------

In the background, the credential provider being used is from [boto3](https://boto3.amazonaws.com).

Credentials from environment variables and the AWS shared credential file will work in the same manner they do with boto3 and the AWS command line.

More about [boto3 credentials](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/configuration.html).

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-sigv4-0.1.5.tar.gz (4.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page