Python REST framework?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy Jones

    Python REST framework?


    Does anyone know if there exists a Python REST (web services) framework? I've googled and come up short. I don't think it should be that hard to do if one doesn't exist (famous last words). I guess one could subclass BaseHTTPServer and have specified things to do depending on the path and the method?


    Jeremy Jones

  • Will Stuyvesant

    #2
    Re: Python REST framework?

    > [Jeremy Jones][color=blue]
    > Does anyone know if there exists a Python REST (web services) framework?
    > I've googled and come up short. I don't think it should be that hard to
    > do ...[/color]

    I'm interested. But I have been looking at the discussion on the rest
    mailing list at http://groups.yahoo.com/group/rest-discuss/ and it
    seems they haven't found a solution for the user:password thing yet.
    Using SSL is a must, but then what? Create some unguessable URI?
    That is not safe enough for banking applications etc. And using
    lowlevel http stuff is also being frowned upon.

    Consider creating a multiuser web-based game in a RESTful way, where
    players can use a password to get access to their avatar. I haven't
    figured out yet how to do such a thing according to REST, using Python
    Standard Library modules.


    --
    Real programmers can write assembly code in any language.
    -- Larry Wall

    Comment

    • Dave Kuhlman

      #3
      Re: Python REST framework?

      Jeremy Jones wrote:
      [color=blue]
      >
      > Does anyone know if there exists a Python REST (web services)
      > framework? I've googled and come up short. I don't think it
      > should be that hard to do if one doesn't exist (famous last
      > words). I guess one could subclass BaseHTTPServer and have
      > specified things to do depending on the path and the method?[/color]

      Not a framework, but may be of help ...

      Doing REST on top of Python Web application servers like Quixote
      and Twisted seems quite simple. Here is a link that might help:



      And, here are several documents explaining how to add complex
      logic to a REST application using a finite state machine (FSM)
      model:




      Dave

      --
      Dave Kuhlman

      [email protected] om

      Comment

      • A.M. Kuchling

        #4
        Re: Python REST framework?

        On 2 Sep 2003 14:52:05 -0700,
        Will Stuyvesant <hwlgw@hotmail. com> wrote:[color=blue]
        > I'm interested. But I have been looking at the discussion on the rest
        > mailing list at http://groups.yahoo.com/group/rest-discuss/ and it
        > seems they haven't found a solution for the user:password thing yet.
        > Using SSL is a must, but then what? Create some unguessable URI?[/color]

        I'm not on the rest-discuss list and therefore don't know what this is
        referring to? What's wrong with returning an HTTP 401 Unauthorized error to
        make the user provide a username and password?

        --amk

        Comment

        • Jack Diederich

          #5
          Re: Python REST framework?

          On Tue, Sep 02, 2003 at 02:52:05PM -0700, Will Stuyvesant wrote:[color=blue][color=green]
          > > [Jeremy Jones]
          > > Does anyone know if there exists a Python REST (web services) framework?
          > > I've googled and come up short. I don't think it should be that hard to
          > > do ...[/color]
          >
          > I'm interested. But I have been looking at the discussion on the rest
          > mailing list at http://groups.yahoo.com/group/rest-discuss/ and it
          > seems they haven't found a solution for the user:password thing yet.
          > Using SSL is a must, but then what? Create some unguessable URI?
          > That is not safe enough for banking applications etc. And using
          > lowlevel http stuff is also being frowned upon.
          >
          > Consider creating a multiuser web-based game in a RESTful way, where
          > players can use a password to get access to their avatar. I haven't
          > figured out yet how to do such a thing according to REST, using Python
          > Standard Library modules.[/color]

          Practicality beats purity, if the only piece of state you keep is
          "this guy is logged in and he authenticated as 'Bob'" then you still
          get 99.99% of the cleanliness of REST. If the workarounds to make
          it 100% REST-ful actually make the solution harder to use and implement
          then I'll gladly be [a little bit] non REST-ty.

          The point of REST is to make things easier to do and cleaner to
          understand, not just so you can name drop "REST", right?

          -jackdied


          Comment

          • Van Gale

            #6
            Re: Python REST framework?

            On Tue, 02 Sep 2003 14:50:19 -0400, Jeremy Jones wrote:
            [color=blue]
            >
            > Does anyone know if there exists a Python REST (web services) framework?
            > I've googled and come up short. I don't think it should be that hard to
            > do if one doesn't exist (famous last words). I guess one could subclass
            > BaseHTTPServer and have specified things to do depending on the path and
            > the method?
            >
            >
            > Jeremy Jones[/color]

            Here's a nice little REST writeup with some sample Python code by Ken
            MacLeod:

            <http://bitsko.slc.ut.u s/blog/restful-api.writeback>

            Otherwise, as Dave Kuhlman mentions it's not that hard to build REST on
            top of some of the existing frameworks like Quixote.

            Van Gale

            Comment

            • Will Stuyvesant

              #7
              Re: Python REST framework?

              > [Van Gale][color=blue]
              > Here's a nice little REST writeup with some sample Python code by Ken
              > MacLeod:
              >
              > <http://bitsko.slc.ut.u s/blog/restful-api.writeback>[/color]

              Thanks for that interesting link. But I could not find the sample Python code...

              Comment

              • Will Stuyvesant

                #8
                Re: Python REST framework?

                > [Jack Diederich][color=blue]
                > Practicality beats purity, if the only piece of state you keep is
                > "this guy is logged in and he authenticated as 'Bob'" then you still
                > get 99.99% of the cleanliness of REST. If the workarounds to make
                > it 100% REST-ful actually make the solution harder to use and implement
                > then I'll gladly be [a little bit] non REST-ty.
                >
                > The point of REST is to make things easier to do and cleaner to
                > understand, not just so you can name drop "REST", right?
                >[/color]

                I thought REST was about "interoperabili ty", a stupid word and I would
                like another but my English is bad. The idea is that HTTP + XML is so
                much standard that everybody can use your services.

                But for some, think about people in the industry, the strongest
                argument for REST is scalability. The web and email are the only
                examples of *really* scalable application, where the numbers are
                dozens of millions. And REST is the web's architecture.


                --
                If Windows is the answer, it must have been a stupid question.

                Comment

                • Van Gale

                  #9
                  Re: Python REST framework?

                  On Wed, 03 Sep 2003 05:14:16 -0700, Will Stuyvesant wrote:[color=blue]
                  > Thanks for that interesting link. But I could not find the sample Python
                  > code...[/color]

                  Oops, my apology! I just scanned the page *really fast* and the shell code
                  registered as Python. I better perform the sackcloth and ashes
                  ritual to regain Python purity.

                  Van

                  Comment

                  Working...