{"id":13612179,"url":"https://github.com/aio-libs/aiobotocore","last_synced_at":"2026-04-01T17:22:43.225Z","repository":{"id":32989905,"uuid":"36618494","full_name":"aio-libs/aiobotocore","owner":"aio-libs","description":"asyncio support for botocore library using aiohttp","archived":false,"fork":false,"pushed_at":"2025-04-09T22:20:00.000Z","size":1749,"stargazers_count":1270,"open_issues_count":15,"forks_count":193,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-04-11T12:22:40.729Z","etag":null,"topics":["aiohttp","asyncio","aws","aws-sdk","botocore","cloud","cloud-management"],"latest_commit_sha":null,"homepage":"https://aiobotocore.aio-libs.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Midnight-Lizard/Midnight-Lizard","license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aio-libs.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":"CONTRIBUTING.rst","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["thehesiod","terrycain"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2015-05-31T19:28:54.000Z","updated_at":"2025-04-10T03:50:23.000Z","dependencies_parsed_at":"2023-09-26T00:38:45.515Z","dependency_job_id":"baf8afc5-33ac-499e-80ad-1178aa129fc7","html_url":"https://github.com/aio-libs/aiobotocore","commit_stats":{"total_commits":702,"total_committers":70,"mean_commits":"10.028571428571428","dds":0.7165242165242165,"last_synced_commit":"ce3f82f7bf76bbdc38fe9c45f7a667b68af65cd6"},"previous_names":[],"tags_count":113,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiobotocore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiobotocore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiobotocore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aio-libs%2Faiobotocore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aio-libs","download_url":"https://codeload.github.com/aio-libs/aiobotocore/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643050,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aiohttp","asyncio","aws","aws-sdk","botocore","cloud","cloud-management"],"created_at":"2024-08-01T20:00:24.075Z","updated_at":"2026-04-01T17:22:43.172Z","avatar_url":"https://github.com/aio-libs.png","language":"Python","funding_links":["https://github.com/sponsors/thehesiod","https://github.com/sponsors/terrycain"],"categories":["HarmonyOS","Python"],"sub_categories":["Windows Manager"],"readme":"aiobotocore\n===========\n.. |ci badge| image:: https://github.com/aio-libs/aiobotocore/actions/workflows/ci-cd.yml/badge.svg?branch=master\n    :target: https://github.com/aio-libs/aiobotocore/actions/workflows/ci-cd.yml\n    :alt: CI status of master branch\n.. |pre-commit badge| image:: https://results.pre-commit.ci/badge/github/aio-libs/aiobotocore/master.svg\n    :target: https://results.pre-commit.ci/latest/github/aio-libs/aiobotocore/master\n    :alt: pre-commit.ci status\n.. |coverage badge| image:: https://codecov.io/gh/aio-libs/aiobotocore/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/aio-libs/aiobotocore\n    :alt: Coverage status on master branch\n.. |docs badge| image:: https://readthedocs.org/projects/aiobotocore/badge/?version=latest\n    :target: https://aiobotocore.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n.. |pypi badge| image:: https://img.shields.io/pypi/v/aiobotocore.svg\n    :target: https://pypi.python.org/pypi/aiobotocore\n    :alt: Latest version on pypi\n.. |gitter badge| image:: https://badges.gitter.im/Join%20Chat.svg\n    :target: https://gitter.im/aio-libs/aiobotocore\n    :alt: Chat on Gitter\n.. |pypi downloads badge| image:: https://img.shields.io/pypi/dm/aiobotocore.svg?label=PyPI%20downloads\n    :target: https://pypi.org/project/aiobotocore/\n    :alt: Downloads Last Month\n.. |conda badge| image:: https://img.shields.io/conda/dn/conda-forge/aiobotocore.svg?label=Conda%20downloads\n    :target: https://anaconda.org/conda-forge/aiobotocore\n    :alt: Conda downloads\n.. |stackoverflow badge| image:: https://img.shields.io/badge/stackoverflow-Ask%20questions-blue.svg\n    :target: https://stackoverflow.com/questions/tagged/aiobotocore\n    :alt: Stack Overflow\n\n|ci badge| |pre-commit badge| |coverage badge| |docs badge| |pypi badge| |gitter badge| |pypi downloads badge| |conda badge| |stackoverflow badge|\n\nAsync client for amazon services using botocore_ and aiohttp_/asyncio_.\n\nThis library is a mostly full featured asynchronous version of botocore.\n\n\nInstall\n-------\n::\n\n    $ pip install aiobotocore\n\n\nBasic Example\n-------------\n\n.. code:: python\n\n    import asyncio\n    from aiobotocore.session import get_session\n\n    AWS_ACCESS_KEY_ID = \"xxx\"\n    AWS_SECRET_ACCESS_KEY = \"xxx\"\n\n\n    async def go():\n        bucket = 'dataintake'\n        filename = 'dummy.bin'\n        folder = 'aiobotocore'\n        key = '{}/{}'.format(folder, filename)\n\n        session = get_session()\n        async with session.create_client('s3', region_name='us-west-2',\n                                       aws_secret_access_key=AWS_SECRET_ACCESS_KEY,\n                                       aws_access_key_id=AWS_ACCESS_KEY_ID) as client:\n            # upload object to amazon s3\n            data = b'\\x01'*1024\n            resp = await client.put_object(Bucket=bucket,\n                                                Key=key,\n                                                Body=data)\n            print(resp)\n\n            # getting s3 object properties of file we just uploaded\n            resp = await client.get_object_acl(Bucket=bucket, Key=key)\n            print(resp)\n\n            # get object from s3\n            response = await client.get_object(Bucket=bucket, Key=key)\n            # this will ensure the connection is correctly re-used/closed\n            async with response['Body'] as stream:\n                assert await stream.read() == data\n\n            # list s3 objects using paginator\n            paginator = client.get_paginator('list_objects_v2')\n            async for result in paginator.paginate(Bucket=bucket, Prefix=folder):\n                for c in result.get('Contents', []):\n                    print(c)\n\n            # delete object from s3\n            resp = await client.delete_object(Bucket=bucket, Key=key)\n            print(resp)\n\n    loop = asyncio.get_event_loop()\n    loop.run_until_complete(go())\n\n\n\nContext Manager Examples\n------------------------\n\n.. code:: python\n\n    from contextlib import AsyncExitStack\n\n    from aiobotocore.session import AioSession\n\n\n    # How to use in existing context manager\n    class Manager:\n        def __init__(self):\n            self._exit_stack = AsyncExitStack()\n            self._s3_client = None\n\n        async def __aenter__(self):\n            session = AioSession()\n            self._s3_client = await self._exit_stack.enter_async_context(session.create_client('s3'))\n\n        async def __aexit__(self, exc_type, exc_val, exc_tb):\n            await self._exit_stack.__aexit__(exc_type, exc_val, exc_tb)\n\n    # How to use with an external exit_stack\n    async def create_s3_client(session: AioSession, exit_stack: AsyncExitStack):\n        # Create client and add cleanup\n        client = await exit_stack.enter_async_context(session.create_client('s3'))\n        return client\n\n\n    async def non_manager_example():\n        session = AioSession()\n\n        async with AsyncExitStack() as exit_stack:\n            s3_client = await create_s3_client(session, exit_stack)\n\n            # do work with s3_client\n\n\n\nSupported AWS Services\n----------------------\n\nThis is a non-exuastive list of what tests aiobotocore runs against AWS services. Not all methods are tested but we aim to test the majority of\ncommonly used methods.\n\n+----------------+-----------------------+\n| Service        | Status                |\n+================+=======================+\n| S3             | Working               |\n+----------------+-----------------------+\n| DynamoDB       | Basic methods tested  |\n+----------------+-----------------------+\n| SNS            | Basic methods tested  |\n+----------------+-----------------------+\n| SQS            | Basic methods tested  |\n+----------------+-----------------------+\n| CloudFormation | Stack creation tested |\n+----------------+-----------------------+\n| Kinesis        | Basic methods tested  |\n+----------------+-----------------------+\n\nDue to the way boto3 is implemented, its highly likely that even if services are not listed above that you can take any ``boto3.client('service')`` and\nstick ``await`` in front of methods to make them async, e.g. ``await client.list_named_queries()`` would asynchronous list all of the named Athena queries.\n\nIf a service is not listed here and you could do with some tests or examples feel free to raise an issue.\n\n\nEnable type checking and code completion\n----------------------------------------\n\nInstall types-aiobotocore_ that contains type annotations for ``aiobotocore``\nand all supported botocore_ services.\n\n.. code:: bash\n\n    # install aiobotocore type annotations\n    # for ec2, s3, rds, lambda, sqs, dynamo and cloudformation\n    python -m pip install 'types-aiobotocore[essential]'\n\n    # or install annotations for services you use\n    python -m pip install 'types-aiobotocore[acm,apigateway]'\n\n    # Lite version does not provide session.create_client overloads\n    # it is more RAM-friendly, but requires explicit type annotations\n    python -m pip install 'types-aiobotocore-lite[essential]'\n\nNow you should be able to run Pylance_, pyright_, or mypy_ for type checking\nas well as code completion in your IDE.\n\nFor ``types-aiobotocore-lite`` package use explicit type annotations:\n\n.. code:: python\n\n    from aiobotocore.session import get_session\n    from types_aiobotocore_s3.client import S3Client\n\n    session = get_session()\n    async with session.create_client(\"s3\") as client:\n        client: S3Client\n        # type checking and code completion is now enabled for client\n\n\nFull documentation for ``types-aiobotocore`` can be found here: https://youtype.github.io/types_aiobotocore_docs/\n\n\nRequirements\n------------\n* Python_ 3.8+\n* aiohttp_\n* botocore_\n\n.. _Python: https://www.python.org\n.. _asyncio: https://docs.python.org/3/library/asyncio.html\n.. _botocore: https://github.com/boto/botocore\n.. _aiohttp: https://github.com/aio-libs/aiohttp\n.. _types-aiobotocore: https://youtype.github.io/types_aiobotocore_docs/\n.. _Pylance: https://marketplace.visualstudio.com/items?itemName=ms-python.vscode-pylance\n.. _pyright: https://github.com/microsoft/pyright\n.. _mypy: http://mypy-lang.org/\n\nawscli \u0026 boto3\n--------------\n\nawscli and boto3 depend on a single version, or a narrow range of versions, of botocore.\nHowever, aiobotocore only supports a specific range of botocore versions. To ensure you\ninstall the latest version of awscli and boto3 that your specific combination or\naiobotocore and botocore can support use::\n\n    pip install -U 'aiobotocore[awscli,boto3]'\n\nIf you only need awscli and not boto3 (or vice versa) you can just install one extra or\nthe other.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiobotocore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faio-libs%2Faiobotocore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faio-libs%2Faiobotocore/lists"}