{ "info": { "author": "Will Stevens", "author_email": "wstevens@cloudops.com", "bugtrack_url": null, "classifiers": [], "description": "Apache CloudStack API Wrapper\n=============================\n\nThis project is a minimalist wrapper around the Apache CloudStack (ACS) API. Its\npurpose is to provide an ACS library that works independent of the ACS version.\nInstead of having function stubs for all of the ACS features, this lib is used\nin conjunction with the ACS API documentation and the `request` function takes\nthe JSON values needed for each call.\n\nIt is expected that you refer to the ACS documentation while using this lib:\nhttps://cloudstack.apache.org/api.html\n\nThere are two ways in which this lib can be consumed:\n\n1. The `API` class can be instantiated from any code. It has a single `request`\n method, which is used to make API calls against ACS. This method takes a python \n dictionary of request parameters and returns a python dictionary with the result.\n\n2. The `CLI` class is a subclass of `API` and is designed to be a convenience\n class for working with stand alone scripts that populate the `API` constructor\n using command line arguments parsed by `docopt`. The command line arguments can be\n passed in directly or they can be added to a JSON file and the `--json` flag can\n be used to reference the JSON file path. A `cli_example.py` file is included in\n the package to give a working example of how to use this use case.\n\nThe core of this library is a single `request` method which is described as follows.\n\n``` python\napi.request(self, params)\n```\n\n``` sphinx\nBuilds the request and returns a python dictionary of the result or None.\n\n:param params: the query parameters to be added to the url\n:type params: dict\n\n:returns: the result of the request as a python dictionary\n:rtype: dict or None\n```\n\n**An example using the parent `API` class:**\n\n``` python\nfrom csapi import API\napi = API(api_key=\"your_api_key\", \n secret_key=\"your_secred_key\", \n endpoint=\"http://127.0.0.1:8080/client/api\")\naccounts = api.request({\n 'command':'listAccounts'\n})\n```\n\n**An example using the `CLI` sub-class:**\n\n``` python\nfrom csapi import CLI\napi = CLI(__doc__)\naccounts = api.request({\n 'command':'listAccounts'\n})\n```\n\n\nINSTALL\n=======\n\nThe easiest way to install this library is through `pip`.\n\n``` bash\n$ pip install csapi\n```\n\nAlternatively, you can pull down the source code directly and install manually.\n\n``` bash\n$ git clone https://github.com/swill/csapi.git\n$ cd csapi\n$ python setup.py install\n```\n\n\nUSAGE\n=====\n\nThe core functionality is documented above, but it is worth spending a minute\nto better describe the `CLI` use case. \n\n``` bash\n$ ./cli_example.py --help\n\nUsage:\n cli_example.py [--json=] [--api_key= --secret_key=] [options]\n cli_example.py (-h | --help)\n\nOptions:\n -h --help Show this screen.\n --json= Path to a JSON config file with the same names \n as the options (without the -- in front).\n --api_key= CS Api Key.\n --secret_key= CS Secret Key.\n --endpoint= CS Endpoint \n [default: http://127.0.0.1:8080/client/api].\n --poll_interval= Interval, in seconds, to check for a result on async jobs \n [default: 5].\n --logging= Boolean to turn on or off logging [default: True].\n --log= The log file to be used [default: logs/cs_api.log].\n --clear_log= Removes the log each time the API object is created \n [default: True].\n --async= Boolean to specify if the API should wait for async calls \n [default: False].\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/swill/csapi", "keywords": null, "license": "Apache Licence v2.0", "maintainer": null, "maintainer_email": null, "name": "csapi", "package_url": "https://pypi.org/project/csapi/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/csapi/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/swill/csapi" }, "release_url": "https://pypi.org/project/csapi/0.0.8/", "requires_dist": null, "requires_python": null, "summary": "A minimalist wrapper around the Apache CloudStack API.", "version": "0.0.8" }, "last_serial": 1902946, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cef878c0653f8892796c4667cd8301fc", "sha256": "f0e86f24f8fb49bd992b0480690116162513a31b0dfba45a424b091f05914fb9" }, "downloads": -1, "filename": "csapi-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cef878c0653f8892796c4667cd8301fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4337, "upload_time": "2015-09-29T21:12:04", "url": "https://files.pythonhosted.org/packages/8f/48/b8d3a91496ca4e704b28dd08db4a27f697400ded3284c560feaf39ad887b/csapi-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "29317927dead481523bdd87504003de2", "sha256": "a03d6e6f130d6a7642201151e1559094118e7b0344c87026597b82fcf0e839ba" }, "downloads": -1, "filename": "csapi-0.0.2.tar.gz", "has_sig": false, "md5_digest": "29317927dead481523bdd87504003de2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4583, "upload_time": "2015-09-30T03:46:57", "url": "https://files.pythonhosted.org/packages/b2/dd/ae74b686dfac2ea9aaaeb8ffb486890a5aca6bcac82b5e3fec6a708ee1dd/csapi-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4fb28b16c85c69b8346eec2e7cb43e20", "sha256": "9c1164b93b49094cedca243471c7acc47afe88f730c532bb151b56218af6fde6" }, "downloads": -1, "filename": "csapi-0.0.3.tar.gz", "has_sig": false, "md5_digest": "4fb28b16c85c69b8346eec2e7cb43e20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4863, "upload_time": "2015-09-30T04:55:43", "url": "https://files.pythonhosted.org/packages/bd/48/bff862c42fd0d2e025dc919ee4b6b670c778c10f7155f6001b2c2adc25ca/csapi-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "dd6b9c7792f76775019b66299195c675", "sha256": "c8292a190d56fead54b9cb3615bf06563207ce7e9065e04acc19367e2f15bc79" }, "downloads": -1, "filename": "csapi-0.0.4.tar.gz", "has_sig": false, "md5_digest": "dd6b9c7792f76775019b66299195c675", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4869, "upload_time": "2015-09-30T05:03:49", "url": "https://files.pythonhosted.org/packages/1f/f3/99609ec29b94b1c60862b26cf013bcb1aec7be1f45a8edb9fb216d63c9be/csapi-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "9d239ee16911af1686b5cea0bdfa2d35", "sha256": "9ab36a6f07e45c57167fb73da8c693103dade164593bdd7787ef1924cb4f09ed" }, "downloads": -1, "filename": "csapi-0.0.5.tar.gz", "has_sig": false, "md5_digest": "9d239ee16911af1686b5cea0bdfa2d35", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4810, "upload_time": "2015-09-30T05:13:30", "url": "https://files.pythonhosted.org/packages/b2/eb/81ca0e7ca2204e0750c3f85045f079a4ce27e78d604af62f181d9720ddc7/csapi-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "d388ac2baa809c76b8db990bd4a66986", "sha256": "40a9a9cb78103f04c73bd446a75da875366349f801c3d9a6117ed02da996ba12" }, "downloads": -1, "filename": "csapi-0.0.6.tar.gz", "has_sig": false, "md5_digest": "d388ac2baa809c76b8db990bd4a66986", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5185, "upload_time": "2015-09-30T16:29:15", "url": "https://files.pythonhosted.org/packages/a0/44/d135a78721a03031ee34ebbc9aece0a310fc5b7066f6856677c233301d94/csapi-0.0.6.tar.gz" } ], "0.0.7": [ { "comment_text": "", "digests": { "md5": "d2ad29b871358e916ec95f40901afbb3", "sha256": "8ffb4bf9465903a45fd4b824d895206c11a51ee2d8ede81855a8d44ee1603ac7" }, "downloads": -1, "filename": "csapi-0.0.7.tar.gz", "has_sig": false, "md5_digest": "d2ad29b871358e916ec95f40901afbb3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5131, "upload_time": "2015-10-01T15:53:20", "url": "https://files.pythonhosted.org/packages/db/a9/5715877f642c2d57f8c03ab461da159b6712fbd90c961227fdf0f9680c33/csapi-0.0.7.tar.gz" } ], "0.0.8": [ { "comment_text": "", "digests": { "md5": "5d3be5212fa3cb209b6dea3d0fd1f95c", "sha256": "c59afd3b8cadb25e3563491064b4dafb3b89aa2f2426648b749b95a73f683d38" }, "downloads": -1, "filename": "csapi-0.0.8.tar.gz", "has_sig": false, "md5_digest": "5d3be5212fa3cb209b6dea3d0fd1f95c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5213, "upload_time": "2016-01-13T17:28:13", "url": "https://files.pythonhosted.org/packages/16/fe/ad160e17c97d5095aaf9dade6c40db703271851be9016fd789e74d0488e3/csapi-0.0.8.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5d3be5212fa3cb209b6dea3d0fd1f95c", "sha256": "c59afd3b8cadb25e3563491064b4dafb3b89aa2f2426648b749b95a73f683d38" }, "downloads": -1, "filename": "csapi-0.0.8.tar.gz", "has_sig": false, "md5_digest": "5d3be5212fa3cb209b6dea3d0fd1f95c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5213, "upload_time": "2016-01-13T17:28:13", "url": "https://files.pythonhosted.org/packages/16/fe/ad160e17c97d5095aaf9dade6c40db703271851be9016fd789e74d0488e3/csapi-0.0.8.tar.gz" } ] }