{ "info": { "author": "Jiao Shuai", "author_email": "jiaoshuaihit@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "Alibaba Cloud OSS SDK for Python\r\n==========================\r\n\r\n.. image:: https://badge.fury.io/py/oss2.svg\r\n :target: https://badge.fury.io/py/oss2\r\n.. image:: https://travis-ci.org/aliyun/aliyun-oss-python-sdk.svg?branch=master\r\n :target: https://travis-ci.org/aliyun/aliyun-oss-python-sdk\r\n.. image:: https://coveralls.io/repos/github/aliyun/aliyun-oss-python-sdk/badge.svg?branch=master\r\n :target: https://coveralls.io/github/aliyun/aliyun-oss-python-sdk?branch=master\r\n\r\n`README of Chinese `_ \r\n------------------\r\n \r\nOverview\r\n----\r\n\r\nAlibaba Cloud Object Storage Python SDK 2.x. This version is not compatible with the previous version (Version 0.x). The package name is `oss2` to avoid conflict with previous versions. \r\n\r\n\r\nThe SDK of this version is dependent on the third-party HTTP library `requests `_ and `crcmod`. Install the SDK following the methods below. \r\n\r\nNote:\r\n\r\n This version does not contain the `osscmd` command line tool. \r\n\r\nRun environment\r\n--------\r\n\r\nPython 2.6\uff0c2.7\uff0c3.3\uff0c3.4\uff0c3.5\r\n\r\n.. note::\r\n\r\n Do not use Python 3.3.0 or 3.3.1. Refer to `Python Issue 16658 `_.\r\n\r\nInstallation method\r\n--------\r\n\r\nInstall the official release version through PIP (taking Linux as an example): \r\n\r\n.. code-block:: bash\r\n\r\n $ pip install oss2\r\n\r\nYou can also install the unzipped installer package directly: \r\n\r\n.. code-block:: bash\r\n\r\n $ sudo python setup.py install\r\n\r\n\r\nQuick use\r\n--------\r\n\r\n.. code-block:: python\r\n\r\n # -*- coding: utf-8 -*-\r\n\r\n import oss2\r\n\r\n endpoint = 'http://oss-cn-hangzhou.aliyuncs.com' # Suppose that your bucket is in the Hangzhou region. \r\n\r\n auth = oss2.Auth('', '')\r\n bucket = oss2.Bucket(auth, endpoint, '')\r\n\r\n # The object key in the bucket is story.txt\r\n key = 'story.txt'\r\n\r\n # Upload\r\n bucket.put_object(key, 'Ali Baba is a happy youth.')\r\n\r\n # Download\r\n bucket.get_object(key).read()\r\n\r\n # Delete\r\n bucket.delete_object(key)\r\n\r\n # Traverse all objects in the bucket\r\n for object_info in oss2.ObjectIterator(bucket):\r\n print(object_info.key)\r\n\r\nFor more examples, refer to the code under the \"examples\" directory. \r\n\r\nHandle errors\r\n--------\r\n\r\nThe Python SDK interface will throw an exception in case of an error (see oss2.exceptions sub-module) unless otherwise specified. An example is provided below:\r\n\r\n.. code-block:: python\r\n\r\n try:\r\n result = bucket.get_object(key)\r\n print(result.read())\r\n except oss2.exceptions.NoSuchKey as e:\r\n print('{0} not found: http_status={1}, request_id={2}'.format(key, e.status, e.request_id))\r\n\r\nTest\r\n----\r\n\r\nFirst set the required AccessKeyId, AccessKeySecret, endpoint and bucket information for the test through environment variables (**Do not use the bucket for the production environment**). \r\nTake the Linux system for example: \r\n\r\n.. code-block:: bash\r\n\r\n $ export OSS_TEST_ACCESS_KEY_ID=\r\n $ export OSS_TEST_ACCESS_KEY_SECRET=\r\n $ export OSS_TEST_ENDPOINT=\r\n $ export OSS_TEST_BUCKET=\r\n\r\n $ export OSS_TEST_STS_ID=\r\n $ export OSS_TEST_STS_KEY=\r\n $ export OSS_TEST_STS_ARN=\r\n\r\n\r\nRun the test in the following method: \r\n\r\n.. code-block:: bash\r\n\r\n $ nosetests # First install nose\r\n\r\nMore usage\r\n--------\r\n- `More examples can be found `_. \r\n- `Python SDK API documentation `_. \r\n- `Official Python SDK documentation `_.\r\n\r\nContact us\r\n--------\r\n- `Alibaba Cloud OSS official website `_.\r\n- `Alibaba Cloud OSS official forum `_.\r\n- `Alibaba Cloud OSS official documentation center `_.\r\n- Alibaba Cloud official technical support: `Submit a ticket `_.\r\n\r\nCode license\r\n--------\r\nFor the MIT license, see LICENSE object. \r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://comname.xdua.com", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "comname", "package_url": "https://pypi.org/project/comname/", "platform": "", "project_url": "https://pypi.org/project/comname/", "project_urls": { "Homepage": "http://comname.xdua.com" }, "release_url": "https://pypi.org/project/comname/0.0.7/", "requires_dist": null, "requires_python": "", "summary": "com (Aliyun Gateway Function Computing Controller) SDK", "version": "0.0.7" }, "last_serial": 4690753, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "977e3fd8ff24f9b04936c0177d2483df", "sha256": "25455498ea65b5afdba4c7a6e5caa770d73162c8371e0aff90cd9a48e34850a5" }, "downloads": -1, "filename": "comname-0.0.1.tar.gz", "has_sig": false, "md5_digest": "977e3fd8ff24f9b04936c0177d2483df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9545, "upload_time": "2018-12-28T10:36:39", "url": "https://files.pythonhosted.org/packages/bb/be/a6ba7f4f18f89a06ba72396e02ddcd4b969d25132139d2bf31fe61a6bd27/comname-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "3937cc29e80590b0b9f739d67824bc91", "sha256": "85201b160875d8af1e1de1113c2ebe24973e37152de98f96787b6a2ce5aa7b31" }, "downloads": -1, "filename": "comname-0.0.2.tar.gz", "has_sig": false, "md5_digest": "3937cc29e80590b0b9f739d67824bc91", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1244258, "upload_time": "2018-12-28T10:43:06", "url": "https://files.pythonhosted.org/packages/3e/29/14e105375ced3544d8c98bf1e82fc12df0dc8316fb2e21e0b6e530090fbe/comname-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "7988b487909d857b6c780ea16d4100e4", "sha256": "a51560b1ee5ecbab7959f5a860e19ebbd757c0870bbcb2dddd8a57fe91f46c9e" }, "downloads": -1, "filename": "comname-0.0.3.tar.gz", "has_sig": false, "md5_digest": "7988b487909d857b6c780ea16d4100e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1443096, "upload_time": "2018-12-28T15:49:27", "url": "https://files.pythonhosted.org/packages/27/79/2608f9607507b55d120eb36ef70bd25a1fe0b0ab839f9982087d6e88ee04/comname-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "c895158426d1b72a27060fced30945c0", "sha256": "6df0f41b074a9ae6b19a66e76ad18c44b30664b911df4e614554d597b1c486d3" }, "downloads": -1, "filename": "comname-0.0.4.tar.gz", "has_sig": false, "md5_digest": "c895158426d1b72a27060fced30945c0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1611308, "upload_time": "2018-12-30T09:49:04", "url": "https://files.pythonhosted.org/packages/98/27/7ee663ee8a69f2c4629ad7c78f663d93d554fee3a9645b073d9f94c83f6d/comname-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "e681d83613f885250aa1e80a5d369023", "sha256": "95378b696b87ece7a6e82d893fa1eb6a9472b579b5905453a1525a5d24039a40" }, "downloads": -1, "filename": "comname-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e681d83613f885250aa1e80a5d369023", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2606924, "upload_time": "2019-01-07T07:16:34", "url": "https://files.pythonhosted.org/packages/ce/b7/8f83e159f692adec357b643dfac65d43b6310cbd1b9a41f153308aefd3bb/comname-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "dfc04280dfa0322046f7bf3fef7c1cc5", "sha256": "81d7d2c68acf137a310e0fa6ef78c749794d8f415f7d0b2de21423a674670382" }, "downloads": -1, "filename": "comname-0.0.6.tar.gz", "has_sig": false, "md5_digest": "dfc04280dfa0322046f7bf3fef7c1cc5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2639888, "upload_time": "2019-01-11T04:23:54", "url": "https://files.pythonhosted.org/packages/11/db/a4406e7b24aa71a2013e334d1e1a2968213026c4c7f4b5df96f2b33f875b/comname-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "c8ef820f0c345566622c97ecb1a8040d", "sha256": "6f7a7b11d8d47c2e30b3167a30614665a8dd803a727faad9ad6221d69d41b271" }, "downloads": -1, "filename": "comname-0.0.7.tar.gz", "has_sig": false, "md5_digest": "c8ef820f0c345566622c97ecb1a8040d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2447277, "upload_time": "2019-01-13T13:46:09", "url": "https://files.pythonhosted.org/packages/88/38/d0b7597fa00bb781b4dd36d63f1bc19b9961a31e7872b11fe1e04ee3063b/comname-0.0.7.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c8ef820f0c345566622c97ecb1a8040d", "sha256": "6f7a7b11d8d47c2e30b3167a30614665a8dd803a727faad9ad6221d69d41b271" }, "downloads": -1, "filename": "comname-0.0.7.tar.gz", "has_sig": false, "md5_digest": "c8ef820f0c345566622c97ecb1a8040d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2447277, "upload_time": "2019-01-13T13:46:09", "url": "https://files.pythonhosted.org/packages/88/38/d0b7597fa00bb781b4dd36d63f1bc19b9961a31e7872b11fe1e04ee3063b/comname-0.0.7.tar.gz" } ] }