Here are the examples of the python api sys._getframe.f_back.f_code.co_name.lower taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Examples
3
Example 1
Project: open-hackathon Source File: hackathon_resource.py
def context(self):
"""Convert input to Context
By default, convert json body to Convext for put/post request, convert args for get/delete request
:rtype: Context
:return Context object from request body or query
"""
caller = sys._getframe().f_back.f_code.co_name.lower()
if caller in ["post", "put"] and not request.path == "/api/user/file":
return Context.from_object(request.get_json(force=True))
else:
return Context.from_object(request.args)