Hi, Since you seem to be determined to reinvent the wheel, may I ask what is your use case to choose flask + largely-roll-one's-own-rest-api vs. Django + DRF?
The same goes for all the recent hoopla in this list over Flask/Bottle over Django, if you ask me. Django is not all that difficult to get into, has a well-established track record, and is eminently scalable. For serious development, one also needs to worry about the community size, and support. I do not even know that Flask/Bottle/what have an edge over Django for any use case, but IMHO if so one would be talking about the scale of one the largest sites on the Internet. Remember, premature oprtimisation is the root of all evil. Sorry, but if you ask me I smell buzzword-driven development. Regards, Gora On 23 June 2015 at 00:20, anu sree <anusree....@gmail.com> wrote: > Thanks krace, > > Good suggestion, I am going to use schematics with flask. I red > about schematics and think that will help me keep validation code clean and > reduce number of statements in the code. > > Thanks > > On Mon, Jun 22, 2015 at 10:48 PM, kracekumar ramaraju < > kracethekingma...@gmail.com> wrote: > > > On Jun 22, 2015 19:03, "anu sree" <anusree....@gmail.com> wrote: > > > > > > Thanks anuvrat and krace, > > > > > > How do we do validation of data in the POST and PUT API request, if we > > use > > > only native fask ?. > > > > That is where serialization library like schematics comes to play. Pass > the > > request data dict to serialization and call validate method. > > > > > I have seen a way in flask-restful, but I am planing to use only native > > > fask. > > > > > > > > http://flask-restful.readthedocs.org/en/latest/api.html#reqparse.RequestParser > > > > > > Thanks, > > > > > > > > > > > > On Mon, Jun 22, 2015 at 6:28 PM, kracekumar ramaraju < > > > kracethekingma...@gmail.com> wrote: > > > > > > > The biggest problem with all rest apis except Django REST framework > is > > no > > > > distinction between serializer and model. Soon that will be problem > for > > the > > > > kind of tasks you want to do. > > > > > > > > I don't use any framework to create apis in Flask. > > > > > > > > I follow different approach, use schematics [1] for serialization, > > Flask > > > > method view and use model methods/service layer to interact with dbs, > > > > queues etc ... > > > > > > > > You can find the similar example for Django in schematics example > > > > directory, it should be easy to implement in Flask too. > > > > > > > > [1]: http://github.com/schematics/schematics > > > > _______________________________________________ > > > > BangPypers mailing list > > > > BangPypers@python.org > > > > https://mail.python.org/mailman/listinfo/bangpypers > > > > > > > _______________________________________________ > > > BangPypers mailing list > > > BangPypers@python.org > > > https://mail.python.org/mailman/listinfo/bangpypers > > _______________________________________________ > > BangPypers mailing list > > BangPypers@python.org > > https://mail.python.org/mailman/listinfo/bangpypers > > > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > https://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers