{ "info": { "author": "jerevia", "author_email": "trilliondawn@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Async aliyun OSS library\n=========================\n\nBased on aiohttp and oss2, Require python3.6+\n\nTo get an object\n\n.. code-block:: python\n\n result = await bucket.get_object(...\n\nTo read the content of object::\n\n body = await result.resp.read()\n\n\nInstall\n----------------\n.. code-block:: shell\n pip install asyncoss\n\n\nGetting started\n----------------\n\n.. code-block:: python\n\n import asyncoss\n\n endpoint = 'http://oss-cn-beijing.aliyuncs.com' # Suppose that your bucket is in the Beijing region.\n\n auth = asyncoss.Auth('', '')\n\n async def main(loop):\n # The object key in the bucket is story.txt\n async with asyncoss.Bucket(auth, endpoint, '') as bucket:\n key = 'story.txt'\n\n # Upload\n await bucket.put_object(key, 'Ali Baba is a happy youth.')\n\n # Upload\n data = dict(a=1, b=2)\n await bucket.put_object(key, json.dumps(data), headers={'Content-Type': 'application/json'})\n\n # Download\n result = await bucket.get_object(key)\n print(result.headers)\n print(await result.resp.read())\n\n # Delete\n await bucket.delete_object(key)\n\n # Traverse all objects in the bucket\n async for object_info in asyncoss.ObjectIterator(bucket):\n print(object_info.key)\n\n loop = asyncio.get_event_loop()\n loop.run_until_complete(go(main))\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "asyncoss", "package_url": "https://pypi.org/project/asyncoss/", "platform": "", "project_url": "https://pypi.org/project/asyncoss/", "project_urls": null, "release_url": "https://pypi.org/project/asyncoss/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A async aliyun OSS library.", "version": "0.0.1" }, "last_serial": 4488064, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "3a459917d8c31a38d935846a52f5217d", "sha256": "b6e9907a597389288e5c9ca6e247836432fb4ad859b969dd2f368f72e15b98f4" }, "downloads": -1, "filename": "asyncoss-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3a459917d8c31a38d935846a52f5217d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22152, "upload_time": "2018-11-15T03:40:01", "url": "https://files.pythonhosted.org/packages/10/e1/2326b3c61d3f07b83cbfac109d0d811017faf7945ca91dfc910ccc247f43/asyncoss-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3a459917d8c31a38d935846a52f5217d", "sha256": "b6e9907a597389288e5c9ca6e247836432fb4ad859b969dd2f368f72e15b98f4" }, "downloads": -1, "filename": "asyncoss-0.0.1.tar.gz", "has_sig": false, "md5_digest": "3a459917d8c31a38d935846a52f5217d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22152, "upload_time": "2018-11-15T03:40:01", "url": "https://files.pythonhosted.org/packages/10/e1/2326b3c61d3f07b83cbfac109d0d811017faf7945ca91dfc910ccc247f43/asyncoss-0.0.1.tar.gz" } ] }