Is it possible to create an API using just webapp2 and Python on Google App Engine?
For example, let's my route /post/123 is handled by this RequestHandler:
class ShowPosts(webapp2.RequestHandler):
def get(self):
posts = Post.query().fetch()
# return the post as data (JSON) here as response
When a client makes a restful request to /post/123, it can be returned the data object (instead of a rendered html page).
Is this possible or recommended?