Skip to main content

Ceph RADOS Gateway (rgw) admin operations REST API

Project description

Python REST API for the Ceph RADOS Gateway (radosgw) admin operations

NOTICE: The library support Ceph version >= 10.2 (Jewel).


  • Version 1.6: Support for Ceph Hammer or older have been dropped.

  • Version 1.7: Functions get_buckets() and get_users() returns an iterator, not a list anymore.

  • Version 1.7.1: Function get_uids() added.

  • Version 1.7.2: Functions get_policy(bucket, object=None, ...) and delete_usage() added. Function set_quota(...) returns None.


  • boto


The package is available on To install it use pip:

pip install radosgw-admin

Or clone this repository and install it locally:

python install

Configuration of the admin user

To create or modify a bucket/user in radosgw, the admin user require the following read,write capabilities (caps):

"caps": [
   { "type": "buckets",
     "perm": "*" },
   { "type": "usage",
     "perm": "read" },
   { "type": "metadata",
     "perm": "read" },
   { "type": "users",
     "perm": "*" }

You can use the radosgw-admin command to add capabilities to an existing user:

radosgw-admin caps add --uid <USER_ID> --caps "buckets=read,write"
radosgw-admin caps add --uid <USER_ID> --caps "users=read,write"


See the example in examples/

Here is a simple example:

import radosgw

rgwadmin = radosgw.connection.RadosGWAdminConnection(host='',
# user operations
testuser2 = rgwadmin.create_user('testuser2',
                                 display_name='A test user',

testuser2.update(display_name='Second test user', suspended=True)

testuser1 = rgwadmin.get_user('testuser1')

# bucket operations
buckets = rgwadmin.get_buckets()
for bucket in buckets:

testuser1_buckets = testuser1.get_buckets()
for bucket in testuser1_buckets:
    # transfer buckets to testuser2

Project details

Download files

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

Source Distribution

radosgw-admin-1.7.2.tar.gz (23.8 kB view hashes)

Uploaded source

Built Distribution

radosgw_admin-1.7.2-py2.py3-none-any.whl (25.5 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page