473,569 Members | 2,593 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Jul 18 '05 #1
8 13809
> [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
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.c om
Jul 18 '05 #3
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
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
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.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

Jul 18 '05 #6
> [Van Gale]
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>


Thanks for that interesting link. But I could not find the sample Python code...
Jul 18 '05 #7
> [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 "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.
Jul 18 '05 #8
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

699
33517
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it...
5
2049
by: scott | last post by:
First my setup: I'm using the framework build of Python 2.4.1 ( http://bob.pythonmac.org/archives/2005/03/31/macpython-241-installer/ ) on an ibook G4 running Mac OS 10.3.8. I installed wxPython 2.5.5.1 ( Unicode runtime 2.5.5.1 for the Panther version of Macpython-OSX 2.4 )
6
2336
by: ajikoe | last post by:
Hello I tried to combine c++ and python together. So I follow from this website: http://kortis.to/radix/python_ext/ I have this code: # prmodule.c static PyObject *pr_isprime(PyObject *self, PyObject *args){ int n, input; if (!PyArg_ParseTuple(args, "i", &input))
37
2545
by: Michele Simionato | last post by:
At work we are shopping for a Web framework, so I have been looking at the available options on the current market. In particular I have looked at Paste and Pylons and I have written my impressions here: http://www.phyast.pitt.edu/~micheles/python/yet-another-comparison-of-web-frameworks.html I do not speak too well of Pylons, so if you...
12
1392
by: pistacchio | last post by:
hi! i'm a php user and a python programmer. i'd love to use python for my server side needs but i can't seem to find what i'm looking for. for most of my php work i use mysql and tinyButStrong (http://www.tinybutstrong.com) which is a very lightweight template engine that offers powerful functionalities. you insert TBS tags in web pages like:...
1
1158
by: SimonPalmer | last post by:
Apologies in advance if this is either a) the wrong board or b) been answered a million times elsewhere, but... I have been given an assignment to get a python module up and running behind an existing web site. At the moment the rest of the site is developed in PHP but the hosts have said they will provide python support for free, although...
0
1618
by: Goldfish | last post by:
Spring Python, the python version of the Spring Framework, has just released version 0.7.1. This patch includes integration with S3, Spring's new service used to distribute binaries. Key Features of Spring Python include: * Inversion Of Control - The idea is to decouple two classes at the interface level. This lets you build many reusable...
1
2598
by: Goldfish | last post by:
Spring Python, the python version of the Spring Framework, has just released version 0.8.0. This release contains a refactored IoC container supporting four formats (XMLConfig, PythonConfig/@Object, PyContainerConfig, and SpringJavaConfig); replacement of the term "component" with "object" in all APIs, classnames, etc.; and other bug fixes...
10
3903
by: Brendan Miller | last post by:
What would heavy python unit testers say is the best framework? I've seen a few mentions that maybe the built in unittest framework isn't that great. I've heard a couple of good things about py.test and nose. Are there other options? Is there any kind of concensus about the best, or at least how they stack up to each other? Brendan
0
7700
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5513
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
2114
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.