Skip to main content

Async boto3 wrapper

Project description

Async AWS SDK for Python

https://img.shields.io/pypi/v/aioboto3.svg https://img.shields.io/travis/terrycain/aioboto3.svg Documentation Status Updates

This package is mostly just a wrapper combining the great work of boto3 and aiobotocore.

aiobotocore allows you to use near enough all of the boto3 client commands in an async manner just by prefixing the command with await.

With aioboto3 you can now usxe the higher level APIs provided by boto3 in an asynchronous manner. Mainly I developed this as I wanted to use the boto3 dynamodb Table object in some async microservices.

Whilst all resources in boto3 should work I havent tested them all, so if what your after is not in the table below then try it out, if it works drop me an issue with a simple test case and I’ll add it to the table.

Services

Status

DynamoDB Service Resource

Tested and working

DynamoDB Table

Tested and working

Example

Simple example of using aioboto3 to put items into a dynamodb table

import asyncio
import aioboto3
from boto3.dynamodb.conditions import Key


async def main():
    async with aioboto3.resource('dynamodb', region_name='eu-central-1') as dynamo_resource:
        table = dynamo_resource.Table('test_table')

        await table.put_item(
            Item={'pk': 'test1', 'col1': 'some_data'}
        )

        result = await table.query(
            KeyConditionExpression=Key('pk').eq('test1')
        )

        print(result['Items'])

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

# Outputs:
#  [{'col1': 'some_data', 'pk': 'test1'}]

Documentation

Docs are here - https://aioboto3.readthedocs.io/en/latest/

Examples here - https://aioboto3.readthedocs.io/en/latest/usage.html

Features

  • Closely mimics the usage of boto3.

Todo

  • More Examples

  • Set up docs

  • Look into monkey-patching the aws xray sdk to be more async if it needs to be.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template. It also makes use of the aiobotocore and boto3 libraries. All the credit goes to them, this is mainly a wrapper with some examples.

History

0.1.0 (2017-09-25)

  • First release on PyPI.

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

aioboto3-1.1.1.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

aioboto3-1.1.1-py2.py3-none-any.whl (9.4 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file aioboto3-1.1.1.tar.gz.

File metadata

  • Download URL: aioboto3-1.1.1.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for aioboto3-1.1.1.tar.gz
Algorithm Hash digest
SHA256 686ade0085e45d4661bca30d35ee668582a1313a9593c9fa58fb73aefbcc99ce
MD5 beaccb40b1f5e1731469707a4d736608
BLAKE2b-256 e7d6955c97903aa526aa0f02d24a7fc9fae7a1b60fb17a02c78ea8121464faef

See more details on using hashes here.

File details

Details for the file aioboto3-1.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for aioboto3-1.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b2bb5c517db1f64b21f592824a87ec683b2872e854362ef382e759996190b0a9
MD5 52a0e7b6d869a7261767ee4127e43cc8
BLAKE2b-256 190f5bfb40ae393d6549044bbf9686c46e7901bcd3048b4d7f34380473759a50

See more details on using hashes here.

Supported by

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