lowhaio-aws-sigv4-unsigned-payload 
AWS Signature Version 4 signing for lowhaio, but with UNSIGNED-PAYLOAD. This avoids having to buffer entire objects to memory before upload to S3. However, the length of the object must be known before upload begins.
Installation
pip install lowhaio lowhaio_aws_sigv4_unsigned_payload
Usage
The request function returned from lowhaio.Pool must be wrapped with lowhaio_aws_sigv4_unsigned_payload.signed, as in the below example.
import os
from lowhaio import Pool
from lowhaio_aws_sigv4_unsigned_payload import signed
request, _ = Pool()
chunk = 'abcdefghijklmnopqrstuvqxyz'
content_length = str(len(chunk) * 1000).encode()
async def body():
for _ in range(0, 1000)
yield chunk
# 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'PUT', 'https://my-bucket.s3-eu-west-1.amazonaws.com/my-key', body=body
headers=((b'content-length': content_length),))
await buffered(body)
Release files for lowhaio-aws-sigv4-unsigned-payload 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lowhaio_aws_sigv4_unsigned_payload-0.0.4.tar.gz | 3.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lowhaio_aws_sigv4_unsigned_payload-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.3 kB
Release files / lowhaio_aws_sigv4_unsigned_payload-0.0.4.tar.gz
| Download URL | lowhaio_aws_sigv4_unsigned_payload-0.0.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f4f3dd535395bbab723068d6572ef2790cee6012fd0ce234ef1ca209b95b231
|
|
BLAKE2b-256 checksum How to use checksums |
8f02184d55be8325344b91cda8985268e89b7a773a54167e4d64147e94ee7c96
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / lowhaio_aws_sigv4_unsigned_payload-0.0.4-py3-none-any.whl
| Download URL | lowhaio_aws_sigv4_unsigned_payload-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
93b8f92166bbc626402d376f3455a25ebdbf78ba3534dbf55a17cb98342a6e54
|
|
BLAKE2b-256 checksum How to use checksums |
7904683f65f17c43a96efec6154356633048db5a41268e9f39d5b00e9d3a2c75
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|