By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,563 Members | 1,058 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,563 IT Pros & Developers. It's quick & easy.

Python REST framework?

P: n/a

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

Jul 18 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
> [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 ...


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
Jul 18 '05 #2

P: n/a
Jeremy Jones wrote:

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?


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:

http://www.rexx.com/~dkuhlman/rest_howto.html

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

http://www.rexx.com/~dkuhlman/fsm_howto.html
http://www.rexx.com/~dkuhlman/fsmGenerate_howto.html

Dave

--
Dave Kuhlman
http://www.rexx.com/~dkuhlman
dk******@rexx.com
Jul 18 '05 #3

P: n/a
On 2 Sep 2003 14:52:05 -0700,
Will Stuyvesant <hw***@hotmail.com> wrote:
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?


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
Jul 18 '05 #4

P: n/a
On Tue, Sep 02, 2003 at 02:52:05PM -0700, Will Stuyvesant wrote:
[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 ...


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.


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
Jul 18 '05 #5

P: n/a
On Tue, 02 Sep 2003 14:50:19 -0400, Jeremy Jones wrote:

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


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

<http://bitsko.slc.ut.us/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

Jul 18 '05 #6

P: n/a
> [Van Gale]
Here's a nice little REST writeup with some sample Python code by Ken
MacLeod:

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


Thanks for that interesting link. But I could not find the sample Python code...
Jul 18 '05 #7

P: n/a
> [Jack Diederich]
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?


I thought REST was about "interoperability", 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.
Jul 18 '05 #8

P: n/a
On Wed, 03 Sep 2003 05:14:16 -0700, Will Stuyvesant wrote:
Thanks for that interesting link. But I could not find the sample Python
code...


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

Jul 18 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.