Skip to content

Instantly share code, notes, and snippets.

@nfarah86
Last active May 19, 2020 16:22
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Use Rockset's Python client to execute an API
# code
from rockset import Client, ParamDict
# more code
def get_avg_pm10_results():
rs = Client(api_key=ROCKSET_API_KEY, api_server='https://api.rs2.usw2.rockset.com')
# retrieve Query Lambda
qlambda = rs.QueryLambda.retrieve(
'YOUR LAMBDA',
version=1,
workspace='commons'
)
params = ParamDict()
results = qlambda.execute(parameters=params)
return results.results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment