what difference between methodview , resource?
it implements api flask-restful:
class api(resource): decorators = [...,] def get(self): # def post(self): # def put(self): # def delete(self): #
actually, can replaced flask:
class api(methodview): decorators = [...,] def get(self): # def post(self): # def put(self): # def delete(self): #
i think flask has offered enough establishing restful api. can't find flask-restful can more flask because have crud methods , decoraters in class of mechanism in same. special flask-restful?
i evaluating whether or not flask-restful necessary me. please tell me, thanks.
i wondering same thing , according post resource inherited methodview (http://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful). article describes added value compared plain flask "flask-restful provides better way handle requestparser class. class works in similar way argparse command line arguments." , of work api still authentication , security parameters/data checking.
thx miguel excellent blog. i'm using flask-restful because seems quite mature.
if need tiny, think can use flask approach.
Comments
Post a Comment