AWS Signature Version 4 signing for lowhaio
Project description
lowhaio-aws-sigv4
AWS Signature Version 4 signing for lowhaio
Installation
pip install lowhaio_aws_sigv4
Usage
The request
function returned from lowhaio.Pool
must be wrapped with lowhaio_aws_sigv4.signed
, as in the below example.
import os
from lowhaio import Pool
from lowhaio_aws_sigv4 import signed
request, _ = Pool()
# A coroutine that returns a tuple a tuple of access key id, secret access
# key, any other headers, such as x-amz-security-token
async def credentials():
return os.environ['AWS_ACCESS_KEY_ID'], os.environ['AWS_SECRET_ACCESS_KEY'], ()
signed_request = request(
request, credentials=credentials, service='s3', region='eu-west-1',
)
code, headers, body = await signed_request(b'GET', 'https://s3-eu-west-1.amazonaws.com/my-bucket/my-key')
async for chunk in body:
print(chunk)
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
Built Distribution
Close
Hashes for lowhaio_aws_sigv4-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc861b9671e06c794ee506985f7e8b18c4389301dbb14d3c5a7495c402df68f8 |
|
MD5 | d7e55cb435b4162100f324ff6837e5a2 |
|
BLAKE2b-256 | 223aafb93de78b09aaa1ca0382fcb7f1b5c5c2e1584f6d0a6bb09c1629bd57ab |