AWS API Gateway Client Lib for IAM Authorized APIs
Project description
AWS API Gateway IAM Authorizer Client
This provides a simple base class for AWS API Gateway clients to provide AWS V4 request signing for http requests when working against APIs using IAM Authorization.
Usage
Assuming the rest api endpoint
from apigw_iam_client import Client
class MyApi(Client):
def list_oranges(self, store_id='all'):
return self.get("%s/oranges" % store_id).json()
>> client = MyApi('bhttps://foix.execute-api.us-east-1.amazonaws.com/dev/')
>> client.list_oranges()
{'version': '0.1.0', 'oranges': []}
The client also supports obtaining credentials via STS Role Assume to access the underlying api, by passing a role arn and optional session_name.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
apigw_iam_client-0.1.tar.gz
(2.2 kB
view details)
File details
Details for the file apigw_iam_client-0.1.tar.gz
.
File metadata
- Download URL: apigw_iam_client-0.1.tar.gz
- Upload date:
- Size: 2.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 921f6062916426277fc617c36fef94ca258ccc3fe4c198a634b760a3040be9a6 |
|
MD5 | 91e1e10b384b6801b4f43e12ca3f5cec |
|
BLAKE2b-256 | 83a604058cfc10a396475f0345b526bfeeb69b7c83481d490854040acbfa4027 |