whale2 / async-kinesis-client

Python Kinesis Client library utilising asyncio
MIT License
13 stars 4 forks source link

new aioboto context handler #10

Open jmcgrath207 opened 4 years ago

jmcgrath207 commented 4 years ago

The new aioboto forces context handlers. This is the only way I could get it working.

aiobotocore==1.0.4


import aiobotocore
session = aiobotocore.get_session()

    async with session.create_client('kinesis', region_name='us-east-1', endpoint_url=aws_endpoint) as client:
        consumer = AsyncKinesisConsumer(
            stream_name='test-stream',
            custom_kinesis_client=client)