On Tue, Jun 23, 2015 at 1:23 PM, Devi wrote:
> On Mon, Jun 22, 2015 at 6:57 PM, 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 ?.
> >
> >
> You could use Cerberus[1], which is a simple vali
Chipping in with my 2c.
If the project is a hobby project (sorry if I missed that in the
thread) or not time-critical or in early stages, it might not be a bad
idea to roll your own code as much as possible for the REST stuff,
just using a bare-bones web framework like Flask or Bottle or CherryPy
On Tue, Jun 23, 2015 at 4:08 PM, anu sree wrote:
> Thanks gora and guruprasad,
>
> I am not using database or other store. My API App just make different API
> requests to other rest api servers.
>
> Does celery need db ?
>
>
>
Unless results of the tasks needs to be stored or any scheduled tasks
Thanks gora and guruprasad,
I am not using database or other store. My API App just make different API
requests to other rest api servers.
Does celery need db ?
Thanks,
On Tue, Jun 23, 2015 at 1:28 PM, L. Guruprasad wrote:
> Hi Anu,
>
> On Tue, Jun 23, 2015 at 1:21 PM, anu sree wrote:
> > I
Hi Anu,
On Tue, Jun 23, 2015 at 1:21 PM, anu sree wrote:
> I just started reading http://www.django-rest-framework.org/
Once you have learnt enough of DRF to start writing code, this -
http://www.cdrf.co/ will be a handy reference.
Hope this helps :)
Thanks & Regards,
Guruprasad
__
On 23 June 2015 at 13:21, anu sree wrote:
> Thanks gora,
>
> I am happy to use django-DRF if I can use it without doing syncdb. I don't
> want to use models and orm.
>
> The REST API app which I am going to develop doesn't have models now.
>
OK. Normally one would use DRF along with Django model
On Mon, Jun 22, 2015 at 6:57 PM, 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 ?.
>
>
You could use Cerberus[1], which is a simple validation library for python
dictionaries.
[1]: http://cerberus.read
Thanks gora,
I am happy to use django-DRF if I can use it without doing syncdb. I don't
want to use models and orm.
The REST API app which I am going to develop doesn't have models now.
I also don't want the apps which are included in settings.INSTALLED_APPS by
default.
I also want to run some
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
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" 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
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:
>
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,
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,
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,
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
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:
>
> >
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
18 matches
Mail list logo