a kong management python client
- environment: python 2.7
- install:
$ pip install git+https://github.com/seethedoor/kongadm.git
- use kongadm.set_conf() to do this
kongadm_url
(required) could be a string of your kongadmin API URLapikey
(optional) your api key to access kongadmbasicauth
(optional) your basicauth infomation as a dict with 'username' and 'password'use_session
(optional) Bollean type value, default as 'True'loglevel
(optional) devfault as 'ERROR'
>>> import kongadm
>>> kongadm.set_conf(kongadm_url='your kongadmin API url')
>>> kongadm.node.info
>>> kongadm.node.status
- use
kongadm.Consumer('your-username')
to create a new consumer - use
kongadm.Consumer.get('your-username')
to get a exist consumer
>>> kongadm.Consumer.list_usernames()
>>> consumer = kongadm.Consumer('your-username')
# set groups property, etc..
>>> consumer.groups = ['group1', 'group2']
>>>