# rgwadmin
[](https://rgwadmin.readthedocs.io/en/latest/?badge=latest)
rgwadmin is a Python library to access the Ceph Object Storage Admin API.
http://docs.ceph.com/docs/master/radosgw/adminops/
## API Example Usage
```python
from rgwadmin import RGWAdmin
rgw = RGWAdmin(access_key='XXX', secret_key='XXX', server='obj.example.com')
rgw.create_user(
uid='liam',
display_name='Liam Monahan',
email='liam@umiacs.umd.edu',
user_caps='usage=read, write; users=read',
max_buckets=1000)
rgw.set_user_quota(
uid='liam',
quota_type='user',
max_size_kb=1024*1024,
enabled=True)
rgw.remove_user(uid='liam', purge_data=True)
```
## User Example Usage
```python
from rgwadmin import RGWAdmin, RGWUser
RGWAdmin.connect(access_key='XXX', secret_key='XXX', server='obj.example.com')
u = RGWUser.create(user_id='test', display_name='Test User')
u.user_quota.size = 1024 * 1024 # in bytes
u.user_quota.enabled = True
u.save()
u.delete()
```
## Requirements
rgwadmin requires the following Python packages:
* [requests](http://python-requests.org/)
* [requests-aws](https://github.com/tax/python-requests-aws)
Additionally, you need to have a [Ceph](http://www.ceph.org) 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](http://docs.ceph.com/docs/master/radosgw/) page for more
information.
Version 2.3.1 was the last to support Python 2.
### Compatibility
rgwadmin implements all documented Admin API operations or recent versions of
Ceph. We also implement some of the undocumented ones, too...
## Installation
```pip install rgwadmin```
## 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
Raw data
{
"_id": null,
"home_page": "https://github.com/UMIACS/rgwadmin",
"name": "rgwadmin",
"maintainer": "UMIACS Staff",
"docs_url": null,
"requires_python": "",
"maintainer_email": "github@umiacs.umd.edu",
"keywords": "ceph,radosgw,admin api",
"author": "Derek Yarnell",
"author_email": "derek@umiacs.umd.edu",
"download_url": "https://files.pythonhosted.org/packages/e8/45/228a1a1948266fff020abcb1e5ce401ecbf69735a576aa72c647b58acdfd/rgwadmin-2.3.3.tar.gz",
"platform": null,
"description": "# rgwadmin\n\n[](https://rgwadmin.readthedocs.io/en/latest/?badge=latest)\n\nrgwadmin is a Python library to access the Ceph Object Storage Admin API.\n\nhttp://docs.ceph.com/docs/master/radosgw/adminops/\n\n\n## API Example Usage\n\n```python\nfrom rgwadmin import RGWAdmin\n\nrgw = RGWAdmin(access_key='XXX', secret_key='XXX', server='obj.example.com')\nrgw.create_user(\n uid='liam',\n display_name='Liam Monahan',\n email='liam@umiacs.umd.edu',\n user_caps='usage=read, write; users=read',\n max_buckets=1000)\nrgw.set_user_quota(\n uid='liam',\n quota_type='user',\n max_size_kb=1024*1024,\n enabled=True)\nrgw.remove_user(uid='liam', purge_data=True)\n```\n\n## User Example Usage\n```python\nfrom rgwadmin import RGWAdmin, RGWUser\n\nRGWAdmin.connect(access_key='XXX', secret_key='XXX', server='obj.example.com')\nu = RGWUser.create(user_id='test', display_name='Test User')\nu.user_quota.size = 1024 * 1024 # in bytes\nu.user_quota.enabled = True\nu.save()\nu.delete()\n```\n\n## Requirements\n\nrgwadmin requires the following Python packages:\n\n * [requests](http://python-requests.org/)\n * [requests-aws](https://github.com/tax/python-requests-aws)\n\nAdditionally, you need to have a [Ceph](http://www.ceph.org) Object Storage\ninstance with a user that has appropriate caps (capabilities) on the parts of\nthe API that you want to access. See the\n[Ceph Object Storage](http://docs.ceph.com/docs/master/radosgw/) page for more\ninformation.\n\nVersion 2.3.1 was the last to support Python 2.\n\n### Compatibility\nrgwadmin implements all documented Admin API operations or recent versions of\nCeph. We also implement some of the undocumented ones, too...\n\n## Installation\n\n```pip install rgwadmin```\n\n\n## License\n\n rgwadmin - a Python interface to the Rados Gateway Admin API\n Copyright (C) 2015 UMIACS\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with this library; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n\n Email:\n github@umiacs.umd.edu\n\n\n",
"bugtrack_url": null,
"license": "LGPL v2.1",
"summary": "Python Rados Gateway Admin API",
"version": "2.3.3",
"split_keywords": [
"ceph",
"radosgw",
"admin api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "403980690b4d1c9e452b87e89606767cb2cdcfa9c0f43f912c5ee07fdbb60fab",
"md5": "5d0b174d547f7ba8d8f4bea954bc52db",
"sha256": "fbcc9af8895d21e961a0d2419a7b2a1b48e6496ba075eb8ef6af5323f95eda0b"
},
"downloads": -1,
"filename": "rgwadmin-2.3.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5d0b174d547f7ba8d8f4bea954bc52db",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 20845,
"upload_time": "2023-01-25T02:55:08",
"upload_time_iso_8601": "2023-01-25T02:55:08.725771Z",
"url": "https://files.pythonhosted.org/packages/40/39/80690b4d1c9e452b87e89606767cb2cdcfa9c0f43f912c5ee07fdbb60fab/rgwadmin-2.3.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e845228a1a1948266fff020abcb1e5ce401ecbf69735a576aa72c647b58acdfd",
"md5": "30bc3ea9cc102f7e5a859bdeda322401",
"sha256": "8762920cbb5821b663c5bf09f014b82ba5ec1d5cd713b7a024a6553a03feea59"
},
"downloads": -1,
"filename": "rgwadmin-2.3.3.tar.gz",
"has_sig": false,
"md5_digest": "30bc3ea9cc102f7e5a859bdeda322401",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 29574,
"upload_time": "2023-01-25T02:55:10",
"upload_time_iso_8601": "2023-01-25T02:55:10.575701Z",
"url": "https://files.pythonhosted.org/packages/e8/45/228a1a1948266fff020abcb1e5ce401ecbf69735a576aa72c647b58acdfd/rgwadmin-2.3.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-25 02:55:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "UMIACS",
"github_project": "rgwadmin",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"tox": true,
"lcname": "rgwadmin"
}