<div dir="ltr"><div>Additionaly  to what Przemek wrote, also Pecan is released more often, IMHO documentation is better written, and described a lot of possibilities of modification, also as Lukasz wrote in previous thread that Pecan is used in openstack.</div><div><br></div><div>So I'm also for Pecan</div><div><br></div><div>Best regards,</div><div>Kamil S.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 3, 2014 at 12:45 PM, Przemyslaw Kaminski <span dir="ltr"><<a href="mailto:pkaminski@mirantis.com" target="_blank">pkaminski@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    The only useful paradigm to write in Flask is MethodView's for me
    [1] because decorators seem hard to refactor for large projects.
    Please look at adding URLs -- one has to additionally specify
    methods to match those from the MethodView -- this is code
    duplication and looks ugly.<br>
    <br>
    It seems though that Fask-RESTful [2] fixes this but then we're
    dependent on 2 projects.<br>
    <br>
    I don't like that Flask uses a global request object [3]. From Flask
    documentation<br>
    <br>
    "Basically you can completely ignore that
    this is the case unless you are doing something like unit testing.
    You
    will notice that code which depends on a request object will
    suddenly break
    because there is no request object. The solution is creating a
    request
    object yourself and binding it to the context."<br>
    <br>
    Yeah, let's make testing even harder...<br>
    <br>
    Pecan looks better in respect of RESTful services [4].<br>
    POST parameters are cleanly passed as arguments to the post method.
    It also provides custom JSON serialization hooks [5] so we can
    forget about explicit serialization in handlers.<br>
    <br>
    So from these 2 choices I'm for Pecan.<br>
    <br>
    [1] <a href="http://flask.pocoo.org/docs/0.10/views/#method-views-for-apis" target="_blank">http://flask.pocoo.org/docs/0.10/views/#method-views-for-apis</a><br>
    [2] <a href="https://flask-restful.readthedocs.org/en/0.3.0/" target="_blank">https://flask-restful.readthedocs.org/en/0.3.0/</a><br>
    [3]
    <a href="http://flask.pocoo.org/docs/0.10/quickstart/#accessing-request-data" target="_blank">http://flask.pocoo.org/docs/0.10/quickstart/#accessing-request-data</a><br>
    [4] <a href="http://pecan.readthedocs.org/en/latest/rest.html" target="_blank">http://pecan.readthedocs.org/en/latest/rest.html</a><br>
    [5] <a href="http://pecan.readthedocs.org/en/latest/jsonify.html" target="_blank">http://pecan.readthedocs.org/en/latest/jsonify.html</a><span class="HOEnZb"><font color="#888888"><br>
    <br>
    <br>
    P.</font></span><div><div class="h5"><br>
    <br>
    <div>On 12/03/2014 10:57 AM, Alexander
      Kislitsky wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div>We had used Flask in the fuel-stats. It was easy and
          pleasant and all project requirements was satisfied. And I saw
          difficulties and workarounds with Pecan, when Nick integrated
          it into Nailgun.</div>
        <div>So +1 for Flask.</div>
        <div><br>
        </div>
      </div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Tue, Dec 2, 2014 at 11:00 PM,
          Nikolay Markov <span dir="ltr"><<a href="mailto:nmarkov@mirantis.com" target="_blank">nmarkov@mirantis.com</a>></span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Michael,
            we already solved all issues I described, and I just don't<br>
            want to solve them once again after moving to another
            framework. Also,<br>
            I think, nothing of these wishes contradicts with good API
            design.<br>
            <div>
              <div><br>
                On Tue, Dec 2, 2014 at 10:49 PM, Michael Krotscheck<br>
                <<a href="mailto:krotscheck@gmail.com" target="_blank">krotscheck@gmail.com</a>>
                wrote:<br>
                > This sounds more like you need to pay off technical
                debt and clean up your<br>
                > API.<br>
                ><br>
                > Michael<br>
                ><br>
                > On Tue Dec 02 2014 at 10:58:43 AM Nikolay Markov
                <<a href="mailto:nmarkov@mirantis.com" target="_blank">nmarkov@mirantis.com</a>><br>
                > wrote:<br>
                >><br>
                >> Hello all,<br>
                >><br>
                >> I actually tried to use Pecan and even created
                a couple of PoCs, but<br>
                >> there due to historical reasons of how our API
                is organized it will<br>
                >> take much more time to implement all
                workarounds we need to issues<br>
                >> Pecan doesn't solve out of the box, like
                working with non-RESTful<br>
                >> URLs, reverse URL lookup, returning custom body
                in 404 response,<br>
                >> wrapping errors to JSON automatically, etc.<br>
                >><br>
                >> As far as I see, each OpenStack project
                implements its own workarounds<br>
                >> for these issues, but still it requires much
                less men and hours for us<br>
                >> to move to Flask-Restful instead of Pecan,
                because all these problems<br>
                >> are already solved there.<br>
                >><br>
                >> BTW, I know a lot of pretty big projects using
                Flask (it's the second<br>
                >> most popular Web framework after Django in
                Python Web community), they<br>
                >> even have their own "hall of fame":<br>
                >> <a href="http://flask.pocoo.org/community/poweredby/" target="_blank">http://flask.pocoo.org/community/poweredby/</a>
                .<br>
                >><br>
                >> On Tue, Dec 2, 2014 at 7:13 PM, Ryan Brown <<a href="mailto:rybrown@redhat.com" target="_blank">rybrown@redhat.com</a>>
                wrote:<br>
                >> > On 12/02/2014 09:55 AM, Igor Kalnitsky
                wrote:<br>
                >> >> Hi, Sebastian,<br>
                >> >><br>
                >> >> Thank you for raising this topic
                again.<br>
                >> >><br>
                >> >> [snip]<br>
                >> >><br>
                >> >> Personally, I'd like to use Flask
                instead of Pecan, because first one<br>
                >> >> is more production-ready tool and I
                like its design. But I believe<br>
                >> >> this should be resolved by voting.<br>
                >> >><br>
                >> >> Thanks,<br>
                >> >> Igor<br>
                >> >><br>
                >> >> On Tue, Dec 2, 2014 at 4:19 PM,
                Sebastian Kalinowski<br>
                >> >> <<a href="mailto:skalinowski@mirantis.com" target="_blank">skalinowski@mirantis.com</a>>
                wrote:<br>
                >> >>> Hi all,<br>
                >> >>><br>
                >> >>> [snip explanation+history]<br>
                >> >>><br>
                >> >>> Best,<br>
                >> >>> Sebastian<br>
                >> ><br>
                >> > Given that Pecan is used for other
                OpenStack projects and has plenty of<br>
                >> > builtin functionality (REST support,
                sessions, etc) I'd prefer it for a<br>
                >> > number of reasons.<br>
                >> ><br>
                >> > 1) Wouldn't have to pull in plugins for
                standard (in Pecan) things<br>
                >> > 2) Pecan is built for high traffic, where
                Flask is aimed at much smaller<br>
                >> > projects<br>
                >> > 3) Already used by other OpenStack
                projects, so common patterns can be<br>
                >> > reused as oslo libs<br>
                >> ><br>
                >> > Of course, the Flask community seems
                larger (though the average flask<br>
                >> > project seems pretty small).<br>
                >> ><br>
                >> > I'm not sure what determines "production
                readiness", but it seems to me<br>
                >> > like Fuel developers fall more in Pecan's
                target audience than in<br>
                >> > Flask's.<br>
                >> ><br>
                >> > My $0.02,<br>
                >> > Ryan<br>
                >> ><br>
                >> > --<br>
                >> > Ryan Brown / Software Engineer, Openstack
                / Red Hat, Inc.<br>
                >> ><br>
                >> >
                _______________________________________________<br>
                >> > OpenStack-dev mailing list<br>
                >> > <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
                >> > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                >><br>
                >><br>
                >><br>
                >> --<br>
                >> Best regards,<br>
                >> Nick Markov<br>
                >><br>
                >> _______________________________________________<br>
                >> OpenStack-dev mailing list<br>
                >> <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
                >> <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                ><br>
                ><br>
                > _______________________________________________<br>
                > OpenStack-dev mailing list<br>
                > <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
                > <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
                ><br>
                <br>
                <br>
                <br>
                --<br>
                Best regards,<br>
                Nick Markov<br>
                <br>
                _______________________________________________<br>
                OpenStack-dev mailing list<br>
                <a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a><br>
                <a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
              </div>
            </div>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
OpenStack-dev mailing list
<a href="mailto:OpenStack-dev@lists.openstack.org" target="_blank">OpenStack-dev@lists.openstack.org</a>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>