MCPcopy Create free account
hub / github.com/SeldonIO/seldon-server / get_token

Function get_token

python/seldon/cli/cmd_api.py:174–185  ·  view source on GitHub ↗
(gopts,command_data,opts,auth)

Source from the content-addressed store, hash-verified

172
173
174def get_token(gopts,command_data,opts,auth):
175 params = {}
176 params["consumer_key"] = auth["key"]
177 params["consumer_secret"] = auth["secret"]
178 url = command_data['conf_data']["server_endpoint"] + "/token"
179 r = requests.get(url,params=params)
180 if not gopts.quiet:
181 print "response code",r.status_code
182 if r.status_code == requests.codes.ok:
183 res = re.sub(r'^j\(',"",r.text)
184 res = re.sub(r'\)$',"",res)
185 return json_to_dict(res)['access_token']
186
187
188def action_call(gopts,command_data,opts):

Callers 1

action_callFunction · 0.70

Calls 2

json_to_dictFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected