{ "info": { "author": "yanhaifeng(\u989c\u6d77\u5cf0)", "author_email": "yanheven@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "###Ucloud Python SDK and Command-Line Tool\n\n#####this is a python sdk for ucloud,as well as a CLI tools for ucloud in linux bash env.\n\n####1. sdk usage:\n\n\n from ucloud-python-sdk import client as uclient\n cl=uclient(base_url, public_key, private_key)\n print cl.uhost.get(region=\"cnnorth-03\",uhostids=\"uhost-4dmzop\")\n\n output:\n {u'Action': u'DescribeUHostInstanceResponse', u'TotalCount': 1, u'RetCode': 0,\n u'UHostSet': [{u'Remark': u'', u'Tag': u'Default', u'Name': u'yan-1',\n u'State': u'Running', u'IPSet': [{u'IP': u'10.11.1.126', u'Type': u'Private'},\n {u'IPId': u'eip-yci4qr', u'IP': u'107.150.97.103', u'Bandwidth': 2,\n u'Type': u'International'}], u'DiskSet': [{u'Type': u'Boot',\n u'Drive': u'/dev/sda', u'DiskId': u'ce3b1751-d837-4949-9c73-29368b7fe820',\n u'Size': 20}], u'CPU': 1, u'OsName': u'Ubuntu 14.04 64\\u4f4d',\n u'BasicImageId': u'uimage-nhwrqn',\n u'ImageId': u'ce3b1751-d837-4949-9c73-29368b7fe820', u'ExpireTime': 1429632272,\n u'UHostType': u'Normal', u'UHostId': u'uhost-4dmzop', u'NetworkState': u'Connected',\n u'ChargeType': u'Month', u'Memory': 2048, u'OsType': u'Linux', u'CreateTime': 1426953872,\n u'BasicImageName': u'Ubuntu 14.04 64\\u4f4d'}]}\n\n\n\n####2. command-line usage:\n\u4f7f\u7528\u4e4b\u524d,\u5148\u7f16\u8f91\u4e0buclud.rc\u6587\u4ef6,\u7136\u540e\u5bfc\u5165\u73af\u5883\u53d8\u91cf,\u63a5\u4e0b\u6765\u7684\u547d\u4ee4\u5c31\u4e0d\u7528\u8f93\u5165\u4f60\u7684\u8ba4\u8bc1\u4fe1\u606f\u4e86.\n\n\t\thyphendeMacBook-Air:ucloud-python-sdk hyphen$ cat ucloud.rc \n\t\texport UCLOUD_REGION=\"cn-north-03\"\n\t\texport UCLOUD_URL=\"https://api.ucloud.cn\"\n\t\texport UCLOUD_PUBKEY=\"asdf\"\n\t\texport UCLOUD_PRIKEY=\"asdf\"\n\n\t\thyphendeMacBook-Air:ucloud-python-sdk hyphen$ source ucloud.rc\n\n hyphendeMacBook-Air:ucloud-python-sdk hyphen$ python shell.py\n usage: ucloud [--debug] [--timings] ...\n\n Command line interface for ucloud\n\n Positional arguments:\n \n uhost-create boot a host\n uhost-image-list\n list all images\n uhost-list list uhosts\n uhost-show show a uhost\n bash-completion\n Prints all of the commands and options to stdout so that\n the ucloud.bash_completion script doesn't have to hard\n code them.\n help Display help about this program or one of its subcommands.\n\n Optional arguments:\n --debug Print debugging output\n --timings Print call timing info\n\n See \"ucloud help COMMAND\" for help on a specific command.\n\n\n\n hyphendeMacBook-Air:ucloud-python-sdk hyphen$ python shell.py uhost-show --uhostid uhost-4dmzop\n +----------------+------------------------------------------------------------------+\n | Property | Value |\n +----------------+------------------------------------------------------------------+\n | BasicImageId | uimage-nhwrqn |\n | BasicImageName | Ubuntu 14.04 64\u4f4d |\n | CPU | 1 |\n | ChargeType | Month |\n | CreateTime | 2015-03-22 00:04:32 |\n | Disk_0 | /dev/sda 20GB Type:Boot ID:ce3b1751-d837-4949-9c73-29368b7fe820 |\n | ExpireTime | 2015-04-22 00:04:32 |\n | IP_0 | Private 10.11.1.126 |\n | IP_1 | International 2Mb/s 107.150.97.103 ID:eip-yci4qr |\n | ImageId | ce3b1751-d837-4949-9c73-29368b7fe820 |\n | Memory | 2048 |\n | Name | yan-1 |\n | NetworkState | Connected |\n | OsType | Linux |\n | Remark | |\n | State | Running |\n | Tag | Default |\n | UHostId | uhost-4dmzop |\n | UHostType | Normal |\n +----------------+------------------------------------------------------------------+", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/yanheven/ucloud-python-sdk", "keywords": "ucloud,client", "license": "Apache License Version 2.0", "maintainer": null, "maintainer_email": null, "name": "ucloud-client", "package_url": "https://pypi.org/project/ucloud-client/", "platform": "any", "project_url": "https://pypi.org/project/ucloud-client/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/yanheven/ucloud-python-sdk" }, "release_url": "https://pypi.org/project/ucloud-client/1.0/", "requires_dist": null, "requires_python": null, "summary": "ucloud python client and command line tools", "version": "1.0" }, "last_serial": 1509367, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "3409077cdbda98397cfb56a56cd65a57", "sha256": "77955186fe2c610d5a9e56df8bf8485a207801a7af8ace41e44bbf2681342ebd" }, "downloads": -1, "filename": "ucloud_client-1.0-py2.7.egg", "has_sig": false, "md5_digest": "3409077cdbda98397cfb56a56cd65a57", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 32481, "upload_time": "2015-04-17T14:14:46", "url": "https://files.pythonhosted.org/packages/06/52/7cc169af8e74f4ff6332747e11311062f2181c92033f81b459d9ee37e461/ucloud_client-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "af66bd1e49ca0c159d50aeccd34ba7ab", "sha256": "c7cc747d7357111c298d6e4d48b588f7ab9c062646310bb91d102657c2e2dc5d" }, "downloads": -1, "filename": "ucloud-client-1.0.tar.gz", "has_sig": false, "md5_digest": "af66bd1e49ca0c159d50aeccd34ba7ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11975, "upload_time": "2015-04-17T14:14:41", "url": "https://files.pythonhosted.org/packages/46/31/8a87247c52e04ef0bfd860c23c1c2238d7bc57bb9b2694bea9de00bd3b74/ucloud-client-1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3409077cdbda98397cfb56a56cd65a57", "sha256": "77955186fe2c610d5a9e56df8bf8485a207801a7af8ace41e44bbf2681342ebd" }, "downloads": -1, "filename": "ucloud_client-1.0-py2.7.egg", "has_sig": false, "md5_digest": "3409077cdbda98397cfb56a56cd65a57", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 32481, "upload_time": "2015-04-17T14:14:46", "url": "https://files.pythonhosted.org/packages/06/52/7cc169af8e74f4ff6332747e11311062f2181c92033f81b459d9ee37e461/ucloud_client-1.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "af66bd1e49ca0c159d50aeccd34ba7ab", "sha256": "c7cc747d7357111c298d6e4d48b588f7ab9c062646310bb91d102657c2e2dc5d" }, "downloads": -1, "filename": "ucloud-client-1.0.tar.gz", "has_sig": false, "md5_digest": "af66bd1e49ca0c159d50aeccd34ba7ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11975, "upload_time": "2015-04-17T14:14:41", "url": "https://files.pythonhosted.org/packages/46/31/8a87247c52e04ef0bfd860c23c1c2238d7bc57bb9b2694bea9de00bd3b74/ucloud-client-1.0.tar.gz" } ] }