<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body 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 class="moz-txt-link-freetext" href="http://flask.pocoo.org/docs/0.10/views/#method-views-for-apis">http://flask.pocoo.org/docs/0.10/views/#method-views-for-apis</a><br>
    [2] <a class="moz-txt-link-freetext" href="https://flask-restful.readthedocs.org/en/0.3.0/">https://flask-restful.readthedocs.org/en/0.3.0/</a><br>
    [3]
    <a class="moz-txt-link-freetext" href="http://flask.pocoo.org/docs/0.10/quickstart/#accessing-request-data">http://flask.pocoo.org/docs/0.10/quickstart/#accessing-request-data</a><br>
    [4] <a class="moz-txt-link-freetext" href="http://pecan.readthedocs.org/en/latest/rest.html">http://pecan.readthedocs.org/en/latest/rest.html</a><br>
    [5] <a class="moz-txt-link-freetext" href="http://pecan.readthedocs.org/en/latest/jsonify.html">http://pecan.readthedocs.org/en/latest/jsonify.html</a><br>
    <br>
    <br>
    P.<br>
    <br>
    <div class="moz-cite-prefix">On 12/03/2014 10:57 AM, Alexander
      Kislitsky wrote:<br>
    </div>
    <blockquote
cite="mid:CAHWr6fnLYqf-dFp3zBfY=Sv3a7g_Nt_byDmeKe3YT6hQSqezmg@mail.gmail.com"
      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 moz-do-not-send="true"
              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 class="HOEnZb">
              <div class="h5"><br>
                On Tue, Dec 2, 2014 at 10:49 PM, Michael Krotscheck<br>
                <<a moz-do-not-send="true"
                  href="mailto:krotscheck@gmail.com">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 moz-do-not-send="true"
                  href="mailto:nmarkov@mirantis.com">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 moz-do-not-send="true"
                  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
                  moz-do-not-send="true"
                  href="mailto:rybrown@redhat.com">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 moz-do-not-send="true"
                  href="mailto:skalinowski@mirantis.com">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 moz-do-not-send="true"
                  href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
                >> > <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
                >> <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
                > <a moz-do-not-send="true"
                  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 moz-do-not-send="true"
                  href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
                <a moz-do-not-send="true"
                  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 class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
OpenStack-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a>
<a class="moz-txt-link-freetext" href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>