How to use the aioboto3.resource function in aioboto3

To help you get started, we’ve selected a few aioboto3 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github terrycain / aioboto3 / tests / test_basic.py View on Github external
async def test_getting_resource_cm(event_loop):
    """Simple getting of resource."""
    aioboto3.DEFAULT_SESSION = None

    async with aioboto3.resource('dynamodb', loop=event_loop, region_name='eu-central-1') as resource:
        assert isinstance(resource.meta.client, AioBaseClient)
github terrycain / aioboto3 / tests / test_basic.py View on Github external
async def test_getting_resource(event_loop):
    """Simple getting of resource."""
    aioboto3.DEFAULT_SESSION = None

    resource = aioboto3.resource('dynamodb', loop=event_loop, region_name='eu-central-1')
    assert isinstance(resource.meta.client, AioBaseClient)
    await resource.close()
github avrae / avrae / gamedata / ddb.py View on Github external
async def _initialize(self):
        """Initialize our async resources: aiohttp, aioboto3"""
        self.http = aiohttp.ClientSession()
        self.dynamo = aioboto3.resource('dynamodb', region_name=DYNAMO_REGION)
        self.ddb_user_table = self.dynamo.Table(DYNAMO_USER_TABLE)
        self.ddb_entity_table = self.dynamo.Table(DYNAMO_ENTITY_TABLE)
        log.info("DDB client initialized")