Skip to main content

Python Rados Gateway Admin API

Project description

aiorgwadmin

Documentation Status

aiorgwadmin is fork of rgwadmin library.

aiorgwadmin is an async Python library to access the Ceph Object Storage Admin API.

http://docs.ceph.com/docs/master/radosgw/adminops/

API Example Usage

import asyncio
from aiorgwadmin import RGWAdmin

async def main():
    rgw = RGWAdmin(access_key='XXX', secret_key='XXX', server='obj.example.com')
    await rgw.create_user(
        uid='liam',
        display_name='Liam Monahan',
        email='liam@umiacs.umd.edu',
        user_caps='usage=read, write; users=read',
        max_buckets=1000)
    await rgw.set_user_quota(
        uid='liam',
        quota_type='user',
        max_size_kb=1024 * 1024,
        enabled=True)
    await rgw.remove_user(uid='liam', purge_data=True)

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

User Example Usage

import asyncio
from aiorgwadmin import RGWAdmin, RGWUser

async def main():
    RGWAdmin.connect(access_key='XXX', secret_key='XXX', server='obj.example.com')
    u = await RGWUser.create(user_id='test', display_name='Test User')
    u.user_quota.size = 1024 * 1024  # in bytes
    u.user_quota.enabled = True
    await u.save()
    await u.delete()

loop = asyncio.get_event_loop()
loop.run_until_complete(main())

Requirements

aiorgwadmin requires the following Python packages:

Additionally, you need to have a Ceph Object Storage instance with a user that has appropriate caps (capabilities) on the parts of the API that you want to access. See the Ceph Object Storage page for more information.

Compatibility

aiorgwadmin implements all documented Admin API operations or recent versions of Ceph. We also implement some of the undocumented ones, too...

Installation

pip install aiorgwadmin

License

rgwadmin - a Python interface to the Rados Gateway Admin API
Copyright (C) 2015  UMIACS

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

Email:
    github@umiacs.umd.edu

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

aiorgwadmin-1.0.0.tar.gz (31.3 kB view details)

Uploaded Source

Built Distribution

aiorgwadmin-1.0.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file aiorgwadmin-1.0.0.tar.gz.

File metadata

  • Download URL: aiorgwadmin-1.0.0.tar.gz
  • Upload date:
  • Size: 31.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for aiorgwadmin-1.0.0.tar.gz
Algorithm Hash digest
SHA256 642ce3f08b089c019e4b7af0b38d7091a85cba28fab8a280556b3b60c4a82ed2
MD5 e59787a01901c2d0c1b76c9fc00f2eec
BLAKE2b-256 0b08bacedfd9b88ccbe760700dd78445550f1f516bfaa63909d96c7bfdbf86b5

See more details on using hashes here.

File details

Details for the file aiorgwadmin-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aiorgwadmin-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

File hashes

Hashes for aiorgwadmin-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cd3b59e30a1ddd0c607129d183a98c109dc78bb4e5ba93eba384174d001d6f45
MD5 ef4ae6ad6f0e5c2a5faa96ae5ca82ee1
BLAKE2b-256 a8ef8a56cd908fd75aee2221a2cd2cf320a916e4509f815fabfd33e18ef102b6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page