librelist archives

« back to archive

Choose Flask-based framework for REST API

Choose Flask-based framework for REST API

From:
Chu Duc Minh
Date:
2013-08-27 @ 07:03
Hi, my team intends to develop REST API for sending Bulk/Transactional
email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
It will be used as backend for an Email marketing app that we developed
(quite similar to Mailchimp), and other apps (in the future) need send mail.

I'm considering some Flask-based frameworks dedicated for REST API:
1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
3. Eve http://python-eve.org/

Could you have me some comparison/experiment/advice on these frameworks?

Thank you very much, folks!

Re: [flask] Choose Flask-based framework for REST API

From:
Jonathan Chen
Date:
2013-08-27 @ 08:31
We've been using flask-restless and it has been working well for us. The
only issue is that its tied to sqlalchemy and you'll have to get use to how
they declare the api, which is good and bad. Flask-restful is ORM agnostic
so you'll need to put up the effort to do that stuff. Eve from the looks of
it is tied to mongodb and redis.

You'll need to see if those requirements are okay for your project
otherwise restful seems like it can work for any situation.


~Jonathan C.


On Tue, Aug 27, 2013 at 12:03 AM, Chu Duc Minh <chu.ducminh@gmail.com>wrote:

> Hi, my team intends to develop REST API for sending Bulk/Transactional
> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
> It will be used as backend for an Email marketing app that we developed
> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>
> I'm considering some Flask-based frameworks dedicated for REST API:
> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
> 3. Eve http://python-eve.org/
>
> Could you have me some comparison/experiment/advice on these frameworks?
>
> Thank you very much, folks!
>

Re: [flask] Choose Flask-based framework for REST API

From:
Chris Hancock
Date:
2013-08-27 @ 14:01
I saw something on slideshare about the underpinnings of Eve, ad I liked
it; But you're right, it is tied to Mongo, and it's also worth noting that
you specify a schema in a separate json file (which could be good think, or
bad, depending on your perspective).

Actually, I'm considering Django-Rest. The framework matters less to me
here, when it's being used purely in the backend.

Also, this might help:

http://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful<http://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful?utm_source=Python+Weekly+Newsletter&utm_campaign=de531de0e2-Python_Weekly_Issue_98_August_1_2013&utm_medium=email&utm_term=0_9e26887fc5-de531de0e2-312678029>


On 27 August 2013 09:31, Jonathan Chen <tamasiaina@gmail.com> wrote:

> We've been using flask-restless and it has been working well for us. The
> only issue is that its tied to sqlalchemy and you'll have to get use to how
> they declare the api, which is good and bad. Flask-restful is ORM agnostic
> so you'll need to put up the effort to do that stuff. Eve from the looks of
> it is tied to mongodb and redis.
>
> You'll need to see if those requirements are okay for your project
> otherwise restful seems like it can work for any situation.
>
>
> ~Jonathan C.
>
>
> On Tue, Aug 27, 2013 at 12:03 AM, Chu Duc Minh <chu.ducminh@gmail.com>wrote:
>
>> Hi, my team intends to develop REST API for sending Bulk/Transactional
>> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
>> It will be used as backend for an Email marketing app that we developed
>> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>>
>> I'm considering some Flask-based frameworks dedicated for REST API:
>> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
>> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
>> 3. Eve http://python-eve.org/
>>
>> Could you have me some comparison/experiment/advice on these frameworks?
>>
>> Thank you very much, folks!
>>
>
>

Re: [flask] Choose Flask-based framework for REST API

From:
Jesaja Everling
Date:
2013-08-27 @ 14:11
You might also want to have a look at
https://github.com/apiguy/flask-classy. It's not a a framework for
building a REST API per se, but it offers class based views that make
building such an API a breeze.

On Tue, Aug 27, 2013 at 4:01 PM, Chris Hancock <chs2048@gmail.com> wrote:
> I saw something on slideshare about the underpinnings of Eve, ad I liked it;
> But you're right, it is tied to Mongo, and it's also worth noting that you
> specify a schema in a separate json file (which could be good think, or bad,
> depending on your perspective).
>
> Actually, I'm considering Django-Rest. The framework matters less to me
> here, when it's being used purely in the backend.
>
> Also, this might help:
> http://blog.miguelgrinberg.com/post/designing-a-restful-api-using-flask-restful
>
>
> On 27 August 2013 09:31, Jonathan Chen <tamasiaina@gmail.com> wrote:
>>
>> We've been using flask-restless and it has been working well for us. The
>> only issue is that its tied to sqlalchemy and you'll have to get use to how
>> they declare the api, which is good and bad. Flask-restful is ORM agnostic
>> so you'll need to put up the effort to do that stuff. Eve from the looks of
>> it is tied to mongodb and redis.
>>
>> You'll need to see if those requirements are okay for your project
>> otherwise restful seems like it can work for any situation.
>>
>>
>> ~Jonathan C.
>>
>>
>> On Tue, Aug 27, 2013 at 12:03 AM, Chu Duc Minh <chu.ducminh@gmail.com>
>> wrote:
>>>
>>> Hi, my team intends to develop REST API for sending Bulk/Transactional
>>> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
>>> It will be used as backend for an Email marketing app that we developed
>>> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>>>
>>> I'm considering some Flask-based frameworks dedicated for REST API:
>>> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
>>> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
>>> 3. Eve http://python-eve.org/
>>>
>>> Could you have me some comparison/experiment/advice on these frameworks?
>>>
>>> Thank you very much, folks!
>>
>>
>

Re: [flask] Choose Flask-based framework for REST API

From:
Ian Douglas
Date:
2013-08-27 @ 14:42
Full disclosure, I work for SendGrid. If you ever get tired of managing
things yourself, give us a call. :o)

I'm a big fan of Flask, I use it for a lot of personal projects (some with
gunicorn/gevent, others deployed to app engine) as well as some internal
tools at the company.

That said, our own APIs (internal only, and external) are built on twisted
to manage things asynchronously and we saw much better performance.
On Aug 27, 2013 1:04 AM, "Chu Duc Minh" <chu.ducminh@gmail.com> wrote:

> Hi, my team intends to develop REST API for sending Bulk/Transactional
> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
> It will be used as backend for an Email marketing app that we developed
> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>
> I'm considering some Flask-based frameworks dedicated for REST API:
> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
> 3. Eve http://python-eve.org/
>
> Could you have me some comparison/experiment/advice on these frameworks?
>
> Thank you very much, folks!
>

Re: [flask] Choose Flask-based framework for REST API

From:
Freedom Dumlao
Date:
2013-08-27 @ 14:47
I'm going to say +1 for Flask-Classy. Makes it easy to write these types of
restful apis and use whatever persistence technology you prefer.

Some may say that my viewpoint is a bit biased though ;)


On Tue, Aug 27, 2013 at 10:42 AM, Ian Douglas <ian.douglas@iandouglas.com>wrote:

> Full disclosure, I work for SendGrid. If you ever get tired of managing
> things yourself, give us a call. :o)
>
> I'm a big fan of Flask, I use it for a lot of personal projects (some with
> gunicorn/gevent, others deployed to app engine) as well as some internal
> tools at the company.
>
> That said, our own APIs (internal only, and external) are built on twisted
> to manage things asynchronously and we saw much better performance.
> On Aug 27, 2013 1:04 AM, "Chu Duc Minh" <chu.ducminh@gmail.com> wrote:
>
>> Hi, my team intends to develop REST API for sending Bulk/Transactional
>> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
>> It will be used as backend for an Email marketing app that we developed
>> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>>
>> I'm considering some Flask-based frameworks dedicated for REST API:
>> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
>> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
>> 3. Eve http://python-eve.org/
>>
>> Could you have me some comparison/experiment/advice on these frameworks?
>>
>> Thank you very much, folks!
>>
>

Re: [flask] Choose Flask-based framework for REST API

From:
Chu Duc Minh
Date:
2013-08-28 @ 02:33
Thank you all for suggestions! I will have a look at Flask-Classy &
Django-rest.

@*Ian Douglas*: i like twisted too, but our team is more familiar with
Gevent (and it's easier). Do you think it's a [quite] good choice for
Transactional Email APIs like Sendgrid/SES? I'm still in the process
of technology
selection and system design. (Frankly, i still not found a good start to
design it, too much thing to consider like deliverability, IP reputation,
manage bounce email, email routing, detect abusive user, v.v...)
If you know some link/docs about this, pls advise me. Thank you!



On Tue, Aug 27, 2013 at 9:47 PM, Freedom Dumlao <freedomdumlao@gmail.com>wrote:

> I'm going to say +1 for Flask-Classy. Makes it easy to write these types
> of restful apis and use whatever persistence technology you prefer.
>
> Some may say that my viewpoint is a bit biased though ;)
>
>
> On Tue, Aug 27, 2013 at 10:42 AM, Ian Douglas <ian.douglas@iandouglas.com>wrote:
>
>> Full disclosure, I work for SendGrid. If you ever get tired of managing
>> things yourself, give us a call. :o)
>>
>> I'm a big fan of Flask, I use it for a lot of personal projects (some
>> with gunicorn/gevent, others deployed to app engine) as well as some
>> internal tools at the company.
>>
>> That said, our own APIs (internal only, and external) are built on
>> twisted to manage things asynchronously and we saw much better performance.
>> On Aug 27, 2013 1:04 AM, "Chu Duc Minh" <chu.ducminh@gmail.com> wrote:
>>
>>> Hi, my team intends to develop REST API for sending Bulk/Transactional
>>> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
>>> It will be used as backend for an Email marketing app that we developed
>>> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>>>
>>> I'm considering some Flask-based frameworks dedicated for REST API:
>>> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
>>> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
>>> 3. Eve http://python-eve.org/
>>>
>>> Could you have me some comparison/experiment/advice on these frameworks?
>>>
>>> Thank you very much, folks!
>>>
>>
>

Re: [flask] Choose Flask-based framework for REST API

From:
Ian Douglas
Date:
2013-08-28 @ 04:09
Like I said in my public post this morning, I'm personally a fan of Flash
and gevent. I can't really speak to whether twisted was the best choice in
the long run or the best choice at the time, I just know we continue to see
great performance from it. That's not to say we won't ever change to
something like Flask/gevent in the future. Use the best tool for the job at
hand, etc. right?
On Aug 27, 2013 8:34 PM, "Chu Duc Minh" <chu.ducminh@gmail.com> wrote:

> Thank you all for suggestions! I will have a look at Flask-Classy &
> Django-rest.
>
> @*Ian Douglas*: i like twisted too, but our team is more familiar with
> Gevent (and it's easier). Do you think it's a [quite] good choice for
> Transactional Email APIs like Sendgrid/SES? I'm still in the process of 
technology
> selection and system design. (Frankly, i still not found a good start to
> design it, too much thing to consider like deliverability, IP reputation,
> manage bounce email, email routing, detect abusive user, v.v...)
> If you know some link/docs about this, pls advise me. Thank you!
>
>
>
> On Tue, Aug 27, 2013 at 9:47 PM, Freedom Dumlao <freedomdumlao@gmail.com>wrote:
>
>> I'm going to say +1 for Flask-Classy. Makes it easy to write these types
>> of restful apis and use whatever persistence technology you prefer.
>>
>> Some may say that my viewpoint is a bit biased though ;)
>>
>>
>> On Tue, Aug 27, 2013 at 10:42 AM, Ian Douglas <ian.douglas@iandouglas.com
>> > wrote:
>>
>>> Full disclosure, I work for SendGrid. If you ever get tired of managing
>>> things yourself, give us a call. :o)
>>>
>>> I'm a big fan of Flask, I use it for a lot of personal projects (some
>>> with gunicorn/gevent, others deployed to app engine) as well as some
>>> internal tools at the company.
>>>
>>> That said, our own APIs (internal only, and external) are built on
>>> twisted to manage things asynchronously and we saw much better performance.
>>> On Aug 27, 2013 1:04 AM, "Chu Duc Minh" <chu.ducminh@gmail.com> wrote:
>>>
>>>> Hi, my team intends to develop REST API for sending Bulk/Transactional
>>>> email (like AmazonSES, Sendgrid API, Mandrill API,.. but simpler).
>>>> It will be used as backend for an Email marketing app that we developed
>>>> (quite similar to Mailchimp), and other apps (in the future) need send mail.
>>>>
>>>> I'm considering some Flask-based frameworks dedicated for REST API:
>>>> 1. Flask-restful http://flask-restful.readthedocs.org/en/latest/
>>>> 2. Flask-restless http://flask-restless.readthedocs.org/en/latest/
>>>> 3. Eve http://python-eve.org/
>>>>
>>>> Could you have me some comparison/experiment/advice on these frameworks?
>>>>
>>>> Thank you very much, folks!
>>>>
>>>
>>
>