Skip to main content

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.

Source Distribution

lowhaio_aws_sigv4-0.0.3.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lowhaio_aws_sigv4-0.0.3-py3-none-any.whl (4.0 kB view details)

Uploaded Python 3

File details

Details for the file lowhaio_aws_sigv4-0.0.3.tar.gz.

File metadata

  • Download URL: lowhaio_aws_sigv4-0.0.3.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lowhaio_aws_sigv4-0.0.3.tar.gz
Algorithm Hash digest
SHA256 f0fee50fb6abb4af25adcba02f5febd20e944ce81295c3bb9c1ef919463e17ec
MD5 21ebad5257d240b72d8b9f2223fc41ef
BLAKE2b-256 c818cc5a05262487192676e6daf1254dbb8215f2e4d893d7fda8ecd628c63b05

See more details on using hashes here.

File details

Details for the file lowhaio_aws_sigv4-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: lowhaio_aws_sigv4-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 4.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.22.0 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1

File hashes

Hashes for lowhaio_aws_sigv4-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2d547fae926100d052b5b44e27683264723315ebd475960caea2962fed0d54f7
MD5 b0f24fb4cc6e7f917d788c2cbff78fad
BLAKE2b-256 3c4997f1d572cde4245262ac47c8c690bb4774521cec5b4bde5c4cdb046b0ccb

See more details on using hashes here.

Supported by

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