Re: How to do python and RESTful
MarkyMarc a écrit : Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Can some one here point me some where I can read about python and RESTful or have some experiences with other? You may want to have a look at Pylons (http://pylonshq.com). -- http://mail.python.org/mailman/listinfo/python-list
Re: How to do python and RESTful
On Sep 5, 9:54 pm, MarkyMarc [EMAIL PROTECTED] wrote: Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Can some one here point me some where I can read about python and RESTful or have some experiences with other? Any help is apricieted. Regards Marc For the client part, there is an easy_installable library called restclient (which I tested very little but it seems to work). For the server part, I am sure there are many available, but is also easy to write your own. For instance, using WSGI, you can do something like: def restful_wsgi_app(env, resp): meth = env.get('REQUEST_METHOD') if meth == 'GET': ... elif meth == 'POST': ... elif meth == 'PUT': elif meth == 'DELETE': ... else: raise ValueError('Unknown HTTPMethod %r!!' % meth) ... Michele Simionato -- http://mail.python.org/mailman/listinfo/python-list
Re: How to do python and RESTful
Michele Simionato [EMAIL PROTECTED] writes: On Sep 5, 9:54 pm, MarkyMarc [EMAIL PROTECTED] wrote: Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Can some one here point me some where I can read about python and RESTful or have some experiences with other? Any help is apricieted. Regards Marc For the client part, there is an easy_installable library called restclient (which I tested very little but it seems to work). For the server part, I am sure there are many available, Another good option is Twisted. The Twisted book from O'Reilly has examples of using the twisted HTTP client as a REST client. I'm using that fairly succesful. S. -- http://mail.python.org/mailman/listinfo/python-list
Re: How to do python and RESTful
MarkyMarc wrote: Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. Translation: I am only interested in a solution that has anticipated my needs almost exactly. [?] I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Would you care to explain why quixote needs to be uptodate? Surely it either does what you want or it doesn't? If it dies, then it hardly matters how up to date it is. Are you also concerned that some parts of Python remains unchanged since before 1.5.2, now almost tne years old? Can some one here point me some where I can read about python and RESTful or have some experiences with other? Any help is apricieted. I hope you don't regard this as being unhelpful. I would encourage you to focus on finding a system that meets your (functionality) requirements. If you want up to date then C# is that way --- ;-) regards Steve -- Steve Holden+1 571 484 6266 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://del.icio.us/steve.holden --- Asciimercial -- Get on the web: Blog, lens and tag the Internet Many services currently offer free registration --- Thank You for Reading - -- http://mail.python.org/mailman/listinfo/python-list
Re: How to do python and RESTful
[MarkyMarc] I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? [Steve Holden] Would you care to explain why quixote needs to be uptodate? Surely it either does what you want or it doesn't? If it dies, then it hardly matters how up to date it is. Are you also concerned that some parts of Python remains unchanged since before 1.5.2, now almost tne years old? FWIW, I have used Quixote on two (v. small-scale) production websites, both started several years ago when there were fewer web toolkits in the Python universe. Every so often I consider reworking one or other of them into one of the newer (read: more recently noised about) toolkits/frameworks. But they work fine as they are, so why bother? As a matter of fact, one uses Quixote v1, the other uses v2 which occasionally throws me when I'm doing some work on both at the same time! TJG -- http://mail.python.org/mailman/listinfo/python-list
How to do python and RESTful
Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Can some one here point me some where I can read about python and RESTful or have some experiences with other? Any help is apricieted. Regards Marc -- http://mail.python.org/mailman/listinfo/python-list
Re: How to do python and RESTful
MarkyMarc wrote: Hi all, I want to make a web service application in python and keywords are RESTful, python and nice urls(urls mapped to python objects). I don't want a big framework but a nice small one, that can just do the things I want. I have be looking at quixote, but is this uptodate? plain mod_python, can this make url to http put,get,delete and post? Can some one here point me some where I can read about python and RESTful or have some experiences with other? Any help is apricieted. Regards Marc Here is a crude version, if you check out CherryPy there exists a RESTful module for it floating around. Plus you will get the power or CherryPy for your apps. I do not have the urls offhand but google should yeild exactly what you need. import BaseHTTPServer class REST(BaseHTTPServer.BaseHTTPRequestHandler): You can implement and do_* method you want def do_GET(self): self.wfile.write(get) def do_POST(self): self.wfile.write(post) def do_PUT(self): self.wfile.write(put) def do_DELETE(self): self.wfile.write(delete) def main(server_class=BaseHTTPServer.HTTPServer, handler_class=REST): server_address = ('', 8000) httpd = server_class(server_address, handler_class) httpd.serve_forever() if __name__ == '__main__': main() Not fully tested but should get on your feet. Hope this helps. Adonis Vargas -- http://mail.python.org/mailman/listinfo/python-list