{"id":16949501,"url":"https://github.com/tailhook/aio-s3","last_synced_at":"2025-09-12T08:43:09.547Z","repository":{"id":20855905,"uuid":"24142622","full_name":"tailhook/aio-s3","owner":"tailhook","description":"The asyncio client for Amazon S3","archived":false,"fork":false,"pushed_at":"2016-10-08T03:17:51.000Z","size":193,"stargazers_count":12,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-11T06:04:24.500Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tailhook.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-17T11:51:37.000Z","updated_at":"2023-06-18T07:26:26.000Z","dependencies_parsed_at":"2022-08-30T12:10:57.600Z","dependency_job_id":null,"html_url":"https://github.com/tailhook/aio-s3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailhook","download_url":"https://codeload.github.com/tailhook/aio-s3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailhook%2Faio-s3/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259211828,"owners_count":22822378,"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":[],"created_at":"2024-10-13T21:55:02.125Z","updated_at":"2025-06-11T06:05:45.445Z","avatar_url":"https://github.com/tailhook.png","language":"Python","readme":"===================\nAsyncio S3 Bindings\n===================\n\n:Status: Alpha\n\nThe `aio-s3` is a small library for accessing Amazon S3 Service that leverages\npython's standard `asyncio` library.\n\nOnly read operations are supported so far, contributions are welcome.\n\n\nExample\n=======\n\nBasically all methods supported so far are shown in this example:\n\n.. code-block:: python\n\n    import asyncio\n    from aios3.bucket import Bucket\n\n    @asyncio.coroutine\n    def main():\n        bucket = Bucket('some-bucket-name',\n            aws_region='eu-west-1',\n            aws_endpoint='s3-eu-west-1.amazonaws.com',\n            aws_key='AKIAIOSFODNN7EXAMPLE',\n            aws_secret='wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY')\n            \n        # List keys based on prefix\n        lst = yield from bu.list('some-prefix')\n        \n        # Get contents file as a string\n        response = yield from bu.get(lst[0])\n        print(len(response))\n        \n        # Get file contents by chunks\n        response = yield from bu.download(lst[0])\n        while 1:\n            chunk = yield from response.read(65536)\n            print(\"Got chunk of \", len(chunk), \"bytes\")\n            if not chunk:\n                break\n\n    asyncio.get_event_loop().run_until_complete(main())\n\n\nReference\n=========\n\n``Bucket(name, *, aws_key, aws_secret, aws_region, aws_endpoint, connector)``:\n    Creates a wrapper object for accessing S3 bucket. Note unlike in many\n    other bindings you need to specify aws_region (and probably aws_endpoint)\n    correctly (see a table_). The ``connector`` is an aiohttp_ connector,\n    which might be used to setup proxy or other useful things.\n\n``Bucket.list(prefix='', max_keys=1000)``:\n    Lists items which start with prefix. Each returned item is a ``Key``\n    object. This method is coroutine.\n\n    .. note:: This method raises assertion error if there are more keys than\n       max_keys. We do not have a method to return keys iteratively yet.\n\n``Bucket.get(key)``:\n    Fetches object names ``key``. The ``key`` might be a string or ``Key``\n    object. Returns bytes. This method is coroutine.\n\n``Bucket.download(key)``:\n    Allows iteratively download the ``key``. The object returned by the\n    coroutine is an object having method ``.read(bufsize)`` which is a\n    coroutine too.\n\n``Key``\n    Represents an S3 key returned by ``Bucket.list``. Key has at least the\n    following attributes:\n\n    * ``key`` -- the full name of the key stored in a bucket\n    * ``last_modified`` -- ``datetime.datetime`` object\n    * ``etag`` -- The ETag, usually md5 of the content with additional quotes\n    * ``size`` -- Size of the object in bytes\n    * ``storage_class`` -- Storage class of the object\n\n\n.. _table: http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region\n.. _aiohttp: http://aiohttp.readthedocs.org\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Faio-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailhook%2Faio-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailhook%2Faio-s3/lists"}