Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A client library in python for the Ceph REST API.

Project description

python-cephclient is a python module to communicate with Ceph’s REST API (ceph-rest-api).

This is currently a work in progress.



The cephclient class takes care of sending calls to the API through HTTP and handle the responses. It supports queries for JSON, XML or plain text.


The wrapper class extends the client and provides helper functions to communicate with the API.

Nothing prevents you from calling the client directly exactly like the wrapper does. The wrapper exists for convenience.

Development, Feedback, Bugs

Want to contribute ? Feel free to send pull requests !

Have problems, bugs, feature ideas ? I am using the github issue tracker to manage them.



Install the package through pip:

pip install python-cephclient

Instanciate CephWrapper:

from cephclient import *

wrapper = CephWrapper(
    endpoint = 'http://apiserver:5000/api/v0.1/',
    debug = True # Optionally increases the verbosity of the client

Do your request and specify the reponse type you are expecting.

Either json, xml or text (default) are available.


response, body = wrapper.get_fsid(body = 'text')




response, body = wrapper.get_fsid(body = 'json')
print(json.dumps(body, indent=4, separators=(',', ': ')))


    "status": "OK",
    "output": {
        "fsid": "d5252e7d-75bc-4083-85ed-fe51fa83f62b"


response, body = wrapper.get_fsid(body = 'xml')
print(etree.tostring(body, pretty_print=True))



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
python-cephclient- (7.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page