https://github.com/openstack/python-adjutantclient
Client library for Adjutant API. Mirror of code maintained at opendev.org.
https://github.com/openstack/python-adjutantclient
Last synced: 12 months ago
JSON representation
Client library for Adjutant API. Mirror of code maintained at opendev.org.
- Host: GitHub
- URL: https://github.com/openstack/python-adjutantclient
- Owner: openstack
- License: apache-2.0
- Created: 2017-06-28T06:33:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-03-06T09:37:00.000Z (over 1 year ago)
- Last Synced: 2025-06-04T00:48:02.689Z (about 1 year ago)
- Language: Python
- Homepage: https://opendev.org/openstack/python-adjutantclient
- Size: 229 KB
- Stars: 4
- Watchers: 6
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
AdjutantClient is a command-line and python client for Adjutant.
Getting Started
===============
Adjutant Client can be installed from PyPI using pip:
::
pip install python-openstackclient python-adjutantclient
The command line client is installed as a plugin for the OpenStack client.
Python API
==========
You can use the API with a keystone session:
>>> from keystoneauth1 import session
>>> from keystoneauth1.identity import v3
>>> from adjutantclient.client import Client
>>> auth = v3.Password(auth_url='http://keystone.host/v3',
username='user',
password='password',
project_name='demo',
user_domain_name='default',
project_domain_name='default')
>>> sess = session.Session(auth=auth)
>>> adjutant = Client('1', session=sess)
If you use a clouds.yaml file os_client_config can also be used:
>>> import os_client_config
>>> sess = os_client_config.make_rest_client('admin-logic')
>>> adjutant = Client('1', session=sess)
A few of the endpoints (users.password_forgot(), token.submit(), signup, token.get()) don't require authentication.
In this case you can instead just pass an endpoint override to the adjutant client constructor.
>>> from adjutantclient.client import Client
>>> adjutant = Client('1', endpoint='http://adjutant.host/v1')