← Back to team overview

fuel-dev team mailing list archive

Re: New web framework

 

Roman,

I did some research on both Flask and Pecan, and second one is really raw
and have some serious "baby diseases". I was interacting with Pecan
developers on how to do simple things via IRC, asking, for example, "Why
can't I return non-default body within 404 response, if HTTP standard
allows it" and got the answer "It's just not a feature of Pecan". I'm not
sure if they fixed most of the issues in current version of Pecan, but even
looking through it's code causes pain. They didn't even have
'application/json' support without monkey patching.

Then, Flask has flask-restful, which already has all that features we were
planning to implement by hand, meaning JSON-wrapped errors, pagination of
collections, out of the box PATCH request support and so on.

Both Pecan and Flask support Python 3 (web.py doesn't).

So, I would vote for writing next version of our API using Flask. If
anybody has any notes or objections - let's discuss and make a final
decision, because we may already need it in 6.0, even though it won't take
much time to rewrite current code.


On Sat, Aug 9, 2014 at 3:41 AM, Roman Alekseenkov <ralekseenkov@xxxxxxxxxxxx
> wrote:

> I used Flask and it has its own drawbacks. Let's understand pros/cons,
> benefits, and time required before making any changes.
>
> Roman
>
>
> On Thu, Aug 7, 2014 at 2:13 AM, Lukasz Oles <loles@xxxxxxxxxxxx> wrote:
>
>> Hi,
>>
>> I think such a big change requires blueprint. Before decision I would
>> like to know answers to this questions:
>>
>> - what's wrong with web.py
>> - what are our requirements for web framework
>>
>> And another question is, why we don't follow community approach? As far
>> as I know none of OS projects is using Flask. Pecan+WSME is already used by
>> ceilometer, ironic and even tuskar. I also saw patch for nova to use pecan.
>> Also if OSTF is using pecan we already have required "in home" knowledge.
>>
>> I never used pecan nor flask and personally I really don't care what we
>> use, but as openstack community member I would like to follow common
>> pattern.
>>
>> Regards
>>
>>
>>
>> On Wed, Aug 6, 2014 at 2:56 PM, Dmitriy Shulyak <dshulyak@xxxxxxxxxxxx>
>> wrote:
>>
>>> Hi,
>>>
>>> What do you mean - no json support?
>>> Ostf is written in pecan - and it always replays with Content-type:
>>> application/json
>>>
>>> I still prefer to use flask, as it is overall better framework with huge
>>> user base, and a lot of plugins, that we can use in future.
>>> For example we can add existing admin panel with nice interface, which
>>> will be quite helpfull in development.
>>>
>>>
>>>
>>> On Wed, Aug 6, 2014 at 3:36 PM, Nikolay Markov <nmarkov@xxxxxxxxxxxx>
>>> wrote:
>>>
>>>> Last time I saw Pecan it didn't have JSON support at all, only
>>>> text/plain and html. That's kinda strange for REST framework.
>>>>
>>>>
>>>> On Wed, Aug 6, 2014 at 4:07 PM, Andrey Danin <adanin@xxxxxxxxxxxx>
>>>> wrote:
>>>>
>>>>> What is the status of Pecan? Does it mature and used broadly in
>>>>> OpenStack community? Or it's buggy like Oslo.messaging?
>>>>>
>>>>>
>>>>> On Wed, Aug 6, 2014 at 1:59 PM, Nikolay Markov <nmarkov@xxxxxxxxxxxx>
>>>>> wrote:
>>>>>
>>>>>> Hello colleagues!
>>>>>>
>>>>>> As you may know, we really want to get rid of old web.py and go
>>>>>> towards something new, especially because for now it's not really hard to
>>>>>> rewrite our API as it became more abstract. Also, in Fuel 6.0 there will be
>>>>>> multiple important changes in our API, so we definitely need to implement
>>>>>> v2, and doing it using modern framework looks like a good start.
>>>>>>
>>>>>> I did some research on both Pecan and Flask, also we had a discussion
>>>>>> on this subject with our Fuel-Python team yesterday, and looks like we're
>>>>>> choosing Flask over Pecan, because there are almost no bad things anybody
>>>>>> could say about it.
>>>>>>
>>>>>> What are your thoughts? I know there is a pull request on Pecan
>>>>>> already, but my personal opinion is it doens't worth all this headache.
>>>>>>
>>>>>> --
>>>>>> Best regards,
>>>>>> Nick Markov
>>>>>>
>>>>>> --
>>>>>> Mailing list: https://launchpad.net/~fuel-dev
>>>>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>>>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>>>>> More help   : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Andrey Danin
>>>>> adanin@xxxxxxxxxxxx
>>>>> skype: gcon.monolake
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Best regards,
>>>> Nick Markov
>>>>
>>>> --
>>>> Mailing list: https://launchpad.net/~fuel-dev
>>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>>> More help   : https://help.launchpad.net/ListHelp
>>>>
>>>>
>>>
>>> --
>>> Mailing list: https://launchpad.net/~fuel-dev
>>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~fuel-dev
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Łukasz Oleś
>>
>> --
>> Mailing list: https://launchpad.net/~fuel-dev
>> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~fuel-dev
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>
> --
> Mailing list: https://launchpad.net/~fuel-dev
> Post to     : fuel-dev@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~fuel-dev
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Best regards,
Nick Markov

Follow ups

References