{ "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://comtags.xdua.com", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "comtags", "package_url": "https://pypi.org/project/comtags/", "platform": "", "project_url": "https://pypi.org/project/comtags/", "project_urls": { "Homepage": "http://comtags.xdua.com" }, "release_url": "https://pypi.org/project/comtags/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "com (Aliyun Gateway Function Computing Controller) SDK", "version": "0.0.4" }, "last_serial": 4629598, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "bed7ec27e77d073f5b6c98b7f24648fc", "sha256": "deb398105f8dd64b534f71c834a1ebc2700f9d66b86ad3b8c3545fd1542a733a" }, "downloads": -1, "filename": "comtags-0.0.1.tar.gz", "has_sig": false, "md5_digest": "bed7ec27e77d073f5b6c98b7f24648fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7461, "upload_time": "2018-12-19T07:58:32", "url": "https://files.pythonhosted.org/packages/2e/78/b8d5e7dc70c2ed1feec2689fa5515ddb2543a303cbbc412e481dcebfa146/comtags-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "987c27c0102dbb5ddb1a1a62729c5a76", "sha256": "5d61286f9b9d58322033953aef1dd42cb0f2b86e1fa41154fe97a4831f6891cd" }, "downloads": -1, "filename": "comtags-0.0.2.tar.gz", "has_sig": false, "md5_digest": "987c27c0102dbb5ddb1a1a62729c5a76", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7450, "upload_time": "2018-12-19T08:46:26", "url": "https://files.pythonhosted.org/packages/94/88/2a7775ed6c3c0ddc245997ec4d51e103b1472c03a480240e5aa9909de4b8/comtags-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "e0d9f137b4f5685240fa26b05b2f11a5", "sha256": "615b2d7509d4b7e163e56c58beec683601ce973f75bbacd063eb2e392596966e" }, "downloads": -1, "filename": "comtags-0.0.3.tar.gz", "has_sig": false, "md5_digest": "e0d9f137b4f5685240fa26b05b2f11a5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 890121, "upload_time": "2018-12-19T08:54:12", "url": "https://files.pythonhosted.org/packages/4d/2f/56ac25f0b1fa37fede562dc25b0ec8985df83c3238372bb72c98f33be065/comtags-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "b68194bbdb321e683b37431e1502e9f8", "sha256": "528fa9a84c9b16e5353dbf3d25b595d5d539f999b8914f68f9581571283e7c3d" }, "downloads": -1, "filename": "comtags-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b68194bbdb321e683b37431e1502e9f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 932108, "upload_time": "2018-12-23T14:29:24", "url": "https://files.pythonhosted.org/packages/3f/80/baf2eb247059cefa0e62e06aae7ebdd6a9a7ef6601df99bef1ef56e321f6/comtags-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b68194bbdb321e683b37431e1502e9f8", "sha256": "528fa9a84c9b16e5353dbf3d25b595d5d539f999b8914f68f9581571283e7c3d" }, "downloads": -1, "filename": "comtags-0.0.4.tar.gz", "has_sig": false, "md5_digest": "b68194bbdb321e683b37431e1502e9f8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 932108, "upload_time": "2018-12-23T14:29:24", "url": "https://files.pythonhosted.org/packages/3f/80/baf2eb247059cefa0e62e06aae7ebdd6a9a7ef6601df99bef1ef56e321f6/comtags-0.0.4.tar.gz" } ] }