aiobotocore
Async client for amazon services using botocore and aiohttp/asyncio.
Main purpose of this library to support amazon s3 api, but other services should work (but may be with minor fixes). For now we have tested only upload/download api for s3. More tests coming soon.
Install
$ pip install -e git+https://github.com/aio-libs/aiobotocore.git@master#egg=aiobotocore
Basic Example
import asyncio
import aiobotocore
AWS_ACCESS_KEY_ID = "xxx"
AWS_SECRET_ACCESS_KEY = "xxx"
@asyncio.coroutine
def go(loop):
bucket = 'dataintake'
filename = 'dummy.bin'
folder = 'aiobotocore'
key = '{}/{}'.format(folder, filename)
session = aiobotocore.get_session(loop=loop)
client = session.create_client('s3', region_name='us-west-2',
aws_secret_access_key=AWS_SECRET_ACCESS_KEY,
aws_access_key_id=AWS_ACCESS_KEY_ID)
# upload object to amazon s3
data = b'\x01'*1024
resp = yield from client.put_object(Bucket=bucket,
Key=key,
Body=data)
print(resp)
# getting s3 object properties of file we just uploaded
resp = yield from client.get_object_acl(Bucket=bucket, Key=key)
print(resp)
# delete object from s3
resp = yield from client.delete_object(Bucket=bucket, Key=key)
print(resp)
loop = asyncio.get_event_loop()
loop.run_until_complete(go(loop))
Run Tests
Make sure you have development requirements installed and your amazon key and secret accessible via environment variables:
$ cd aiobotocore $ export AWS_ACCESS_KEY_ID=xxx $ export AWS_SECRET_ACCESS_KEY=xxx $ pip install -Ur requirements-dev.txt
Execute tests suite:
$ py.test -v tests
Requirements
Changes
0.0.1 (xxxx-xx-xx)
Initial release
Metadata
Release files for aiobotocore-mirror 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 | Provenance | |
|---|---|---|---|---|
| aiobotocore-mirror-0.0.4.tar.gz | 15.6 kB | Without provenance | Details |
Release files / aiobotocore-mirror-0.0.4.tar.gz
| Download URL | aiobotocore-mirror-0.0.4.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
187febbc1f265dc63204967468350fe67dfa7841b62e15e45a7207a753569316
|
|
BLAKE2b-256 checksum How to use checksums |
eb8f8f761663d2980338f1e9267075d4a8fbec37eb22b9758bfda68c412e54cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for aiobotocore-mirror 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.