Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

AWS Signature Version 4 signing for lowhaio

Project description

lowhaio-aws-sigv4 CircleCI

AWS Signature Version 4 signing for lowhaio

Installation

pip install lowhaio 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.

Files for lowhaio-aws-sigv4, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size lowhaio_aws_sigv4-0.0.4-py3-none-any.whl (4.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size lowhaio_aws_sigv4-0.0.4.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page