Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread Gora Mohanty
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

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread anu sree
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: >

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread kracekumar ramaraju
On Jun 22, 2015 19:03, "anu sree" 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 vali

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread anu sree
Thanks dhruv, That is for validating the form. I don't have forms in my app, i just want to validate the data in the REST API request. I think, good choice is http://flask-restful.readthedocs.org/en/latest/api.html#reqparse.RequestParser On Mon, Jun 22, 2015 at 7:59 PM, Dhruv Baldawa wrote: >

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread Dhruv Baldawa
You can either add those yourself, or use something like Flask-WTF[1] or validictory[2] based on your requirements. [1]: https://flask-wtf.readthedocs.org/en/latest/ [2]: https://readthedocs.org/projects/validictory/ On Mon, Jun 22, 2015 at 6:57 PM, anu sree wrote: > Thanks anuvrat and krace,

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread anu sree
Thanks anuvrat and krace, How do we do validation of data in the POST and PUT API request, if we use only native fask ?. 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,

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread kracekumar ramaraju
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,

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread Anuvrat Parashar
On Mon, Jun 22, 2015 at 3:25 PM, anu sree wrote: > Thanks anuvrat, > > My first question was, Should I use only flask to develop REST API like in > this example https://github.com/miguelgrinberg/api-pycon2015 > > or fask + flask_restful ? > All flask-restful does is providing you a very basic sca

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread anu sree
Thanks anuvrat, My first question was, Should I use only flask to develop REST API like in this example https://github.com/miguelgrinberg/api-pycon2015 or fask + flask_restful ? On Mon, Jun 22, 2015 at 3:00 PM, Anuvrat Parashar wrote: > On Mon, Jun 22, 2015 at 2:06 PM, anu sree wrote: > > >

[BangPypers] (no subject)

2015-06-22 Thread Martin Anto
Please remove from group. Sorry for the inconvenience caused. ___ BangPypers mailing list BangPypers@python.org https://mail.python.org/mailman/listinfo/bangpypers

Re: [BangPypers] UI less Rest API server with flask

2015-06-22 Thread Anuvrat Parashar
On Mon, Jun 22, 2015 at 2:06 PM, anu sree wrote: > Hi, > > I want to develop an API server (don't need GUI). > I am planning to use flask to develop this UI less API server. > > Question-1: > I have seen an example here > https://github.com/miguelgrinberg/api-pycon2015 > But above example does no

[BangPypers] UI less Rest API server with flask

2015-06-22 Thread anu sree
Hi, I want to develop an API server (don't need GUI). I am planning to use flask to develop this UI less API server. Question-1: I have seen an example here https://github.com/miguelgrinberg/api-pycon2015 But above example does not use flask_restful extension. Here I need your help to take decisi