Skip to content

Instantly share code, notes, and snippets.

@dsuch
Created February 4, 2015 20:37
Show Gist options
  • Save dsuch/a44697bb2395e18498d9 to your computer and use it in GitHub Desktop.
Save dsuch/a44697bb2395e18498d9 to your computer and use it in GitHub Desktop.
Using KVDB get-key-list and get-value-list
from zato.server.service import Service
class Dicts(Service):
def handle(self):
service = 'zato.kvdb.data-dict.dictionary.get-key-list'
request = {'system':'System'}
response = self.invoke(service, request)
# {u'zato_kvdb_data_dict_dictionary_get_key_list_response':
# [{u'name': u'Key'}, {u'name': u'Key2'}]}
self.logger.info(response)
service = 'zato.kvdb.data-dict.dictionary.get-value-list'
request = {'system':'System', 'key': 'Key'}
response = self.invoke(service, request)
# {u'zato_kvdb_data_dict_dictionary_get_value_list_response':
# [{u'name': u'Value'}, {u'name': u'Value2'}]}
self.logger.info(response)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment