{ "info": { "author": "David Moreau Simard", "author_email": "moi@dmsimard.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Information Technology", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Topic :: Utilities" ], "description": "python-cephclient is a python module to communicate with `Ceph's REST API`_ (``ceph-rest-api``).\r\n\r\n.. _Ceph's REST API: http://ceph.com/docs/master/man/8/ceph-rest-api/\r\n\r\nThis is currently a work in progress.\r\n\r\nABOUT\r\n==================================================\r\n\r\nClient\r\n--------------------------------------------------\r\n\r\nThe cephclient class takes care of sending calls to the API through HTTP and\r\nhandle the responses. It supports queries for JSON, XML, plain text or binary.\r\n\r\nWrapper\r\n--------------------------------------------------\r\n\r\nThe wrapper class extends the client and provides helper functions to\r\ncommunicate with the API.\r\n\r\nNothing prevents you from calling the client directly exactly like the wrapper\r\ndoes.\r\nThe wrapper exists for convenience.\r\n\r\nDevelopment, Feedback, Bugs\r\n--------------------------------------------------\r\n\r\nWant to contribute ? Feel free to send pull requests !\r\n\r\nHave problems, bugs, feature ideas ?\r\nI am using the github `issue tracker`_ to manage them.\r\n\r\n.. _issue tracker: https://github.com/dmsimard/python-cephclient/issues\r\n\r\n\r\nHOW TO USE\r\n==================================================\r\n\r\nInstallation\r\n----------------\r\nInstall the package through pip::\r\n\r\n pip install python-cephclient\r\n\r\nInstallation does not work ?\r\n\r\npython-cephclient depends on lxml which itself\r\ndepends on some packages. To install lxml's dependencies on Ubuntu::\r\n\r\n apt-get install python-dev libxml2-dev libxslt-dev\r\n\r\n\r\nInstanciate CephWrapper::\r\n\r\n from cephclient.wrapper import *\r\n\r\n wrapper = CephWrapper(\r\n endpoint = 'http://apiserver:5000/api/v0.1/',\r\n debug = True # Optionally increases the verbosity of the client\r\n )\r\n\r\nDo your request and specify the reponse type you are expecting.\r\n\r\nEither ``json``, ``xml``, ``text`` (default) or ``binary`` are available.\r\n\r\njson::\r\n\r\n response, body = wrapper.get_fsid(body = 'json')\r\n print('Response: {0}, Body:\\n{1}'.format(response, json.dumps(body, indent=4, separators=(',', ': '))))\r\n\r\n ====\r\n\r\n Response: , Body:\r\n {\r\n \"status\": \"OK\",\r\n \"output\": {\r\n \"fsid\": \"d5252e7d-75bc-4083-85ed-fe51fa83f62b\"\r\n }\r\n }\r\n\r\n\r\nxml::\r\n\r\n response, body = wrapper.get_fsid(body = 'xml')\r\n print('Response: {0}, Body:\\n{1}'.format(reponse, etree.tostring(body, pretty_print=True)))\r\n\r\n ====\r\n\r\n Response: , Body:\r\n \r\n \r\n d5252e7d-75bc-4083-85ed-fe51fa83f62b\r\n \r\n \r\n OK\r\n \r\n \r\n\r\n\r\n\r\ntext::\r\n\r\n response, body = wrapper.get_fsid(body = 'text')\r\n print('Response: {0}, Body:\\n{1}'.format(response, body))\r\n\r\n ====\r\n\r\n Response: , Body:\r\n d5252e7d-75bc-4083-85ed-fe51fa83f62b\r\n\r\nbinary::\r\n\r\n response, body = wrapper.mon_getmap(body = 'binary')\r\n # < Do something binary with 'body' >\r\n\r\n\r\nRELEASE NOTES\r\n==================================================\r\n**0.1.0.5**\r\n\r\ndmsimard:\r\n\r\n- Add missing dependency on the requests library\r\n- Some PEP8 and code standardization cleanup\r\n- Add root \"PUT\" methods\r\n- Add mon \"PUT\" methods\r\n- Add mds \"PUT\" methods\r\n- Add auth \"PUT\" methods\r\n\r\nDonald Talton:\r\n\r\n- Add osd \"PUT\" methods\r\n\r\n**0.1.0.4**\r\n\r\n- Fix setup and PyPi installation\r\n\r\n**0.1.0.3**\r\n\r\n- GET API calls under '/tell' have been implemented.\r\n- GET API calls are are in root (/) have been renamed to be coherent with incoming future development\r\n\r\n**0.1.0.2**\r\n\r\n- Implemented or fixed missing GET calls (All API GET calls that are not under the '/tell' namespace are now supported)\r\n- Client can optionally raise an exception when requesting a unsupported body type for a provided API call (ex: requesting json through the wrapper for a call that is known to only return binary will raise an exception)\r\n- Client now supports binary type responses (ex: crush map, mon map, etc)\r\n- Improved the README (!)\r\n\r\n\r\n**0.1.0.1**\r\n\r\n- First public release of python-cephclient", "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/dmsimard/python-cephclient", "keywords": "ceph rest api ceph-rest-api client library", "license": "Apache License, Version 2.0", "maintainer": "", "maintainer_email": "", "name": "python-cephclient", "package_url": "https://pypi.org/project/python-cephclient/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/python-cephclient/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/dmsimard/python-cephclient" }, "release_url": "https://pypi.org/project/python-cephclient/0.1.0.5/", "requires_dist": null, "requires_python": null, "summary": "A client library in python for the Ceph REST API.", "version": "0.1.0.5" }, "last_serial": 1457453, "releases": { "0.1.0.1": [ { "comment_text": "", "digests": { "md5": "0871c2c80548637aa96933708d957199", "sha256": "962dc09e70a97620fd891ce49c06f9b458732d81f72fe9f604f7d17aa0607e7d" }, "downloads": -1, "filename": "python-cephclient-0.1.0.1.tar.gz", "has_sig": false, "md5_digest": "0871c2c80548637aa96933708d957199", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7727, "upload_time": "2014-01-31T01:16:42", "url": "https://files.pythonhosted.org/packages/dc/11/881679bc1a30105157ca687cc01fed8cdefaf4e6dd00e02c4484e726f0ca/python-cephclient-0.1.0.1.tar.gz" } ], "0.1.0.2": [ { "comment_text": "", "digests": { "md5": "2e36d492c3119facb92a0c3ad33783e4", "sha256": "44afcae231dcb5cc4b4cfc74f619eafa0c6360b0a5ae1834b14953bfd27ebb26" }, "downloads": -1, "filename": "python-cephclient-0.1.0.2.tar.gz", "has_sig": false, "md5_digest": "2e36d492c3119facb92a0c3ad33783e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8432, "upload_time": "2014-01-31T01:14:17", "url": "https://files.pythonhosted.org/packages/b4/e5/7016af165d53c0a3d63b7515e6d54b263aa99a9871d6634f26b23247678a/python-cephclient-0.1.0.2.tar.gz" } ], "0.1.0.3": [ { "comment_text": "", "digests": { "md5": "9c5901ac16661559d16c3f84d2957577", "sha256": "b871cc28a4d5b6caf73619e597a47cb3e7bd4ace82615abfc54d8be0ab3975e2" }, "downloads": -1, "filename": "python-cephclient-0.1.0.3.tar.gz", "has_sig": false, "md5_digest": "9c5901ac16661559d16c3f84d2957577", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8648, "upload_time": "2014-01-31T01:12:18", "url": "https://files.pythonhosted.org/packages/dc/a3/b3db7aa2ba23f1824ae2bd97b8694d12dc67765c5c74ed1293467c699d6a/python-cephclient-0.1.0.3.tar.gz" } ], "0.1.0.4": [ { "comment_text": "", "digests": { "md5": "026aefd497c0426317d951f9a6e6f251", "sha256": "23ceae1f30238f7f57912422cf9baa43b7c80ed88fc14ec749986eef5f2d6007" }, "downloads": -1, "filename": "python-cephclient-0.1.0.4.tar.gz", "has_sig": false, "md5_digest": "026aefd497c0426317d951f9a6e6f251", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9641, "upload_time": "2014-02-07T03:10:18", "url": "https://files.pythonhosted.org/packages/23/61/8b65f16fc874f8270ae4733995935dcc08b8102b81732a14278629c3b4c6/python-cephclient-0.1.0.4.tar.gz" } ], "0.1.0.5": [ { "comment_text": "", "digests": { "md5": "e3746607f1af1573a241b4995c10c938", "sha256": "9776b786da2aebdc0439ea2f809cc8923f52bc0cf610f77a9c1348466961134b" }, "downloads": -1, "filename": "python-cephclient-v0.1.0.5.tar.gz", "has_sig": false, "md5_digest": "e3746607f1af1573a241b4995c10c938", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10616, "upload_time": "2015-03-11T15:39:24", "url": "https://files.pythonhosted.org/packages/b2/4f/e8d46c0c836d2d1ed5d194f72a966b6563aab10cfa332c43f24f55224953/python-cephclient-v0.1.0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e3746607f1af1573a241b4995c10c938", "sha256": "9776b786da2aebdc0439ea2f809cc8923f52bc0cf610f77a9c1348466961134b" }, "downloads": -1, "filename": "python-cephclient-v0.1.0.5.tar.gz", "has_sig": false, "md5_digest": "e3746607f1af1573a241b4995c10c938", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10616, "upload_time": "2015-03-11T15:39:24", "url": "https://files.pythonhosted.org/packages/b2/4f/e8d46c0c836d2d1ed5d194f72a966b6563aab10cfa332c43f24f55224953/python-cephclient-v0.1.0.5.tar.gz" } ] }