Posted on | September 29, 2008 | 15 Comments
As I mentioned here, recently I’ve been doing some research in REST. Specifically, I’ve been looking for ways to implement REST web services for some of our Python-based routines. The idea is to do it in a way that is describable in a WSDL, so that we can control that from a workflow engine in the future.
If you are more or less in the same boat, here is some recommendations to ease your research.
First, read the basics:
- How to Create a REST Protocol – MUST READ
- Building Web Services the REST way – Nice tutorial
- Common REST mistakes
- Yahoo’s example for consuming REST services – Has some implementation concepts that would help you understand how to consume services.
You’d need to find out if you just need to publish your services, or if you also need to consume other people’s services, or both. Yahoo’s guide is really good in showing how you’d consume Yahoo’s (and others) services, while the other two guides explain how to publish.
For us, we need to both publish and consume services. We have decided to implement our producer part of it (the web services provider) using Pylons. Here are Pylons essentials to create RESTfull services:
- Routes Manual, the routing system of Pylons
- Pylons REST decorators – How to map different HTTP verbs to different actions
If frameworks is to limiting, and you would like to roll your own REST publishing engine, look at the following:
- Selector – A python WSGI routing system
- Yaro – A simple but non-restrictive WSGI abstractor for end user
To implement the client part, read the following:
- Httplib2 project page
- Httplib2 reference library
- URLlib2 documentation
- Python-rest-client project page
- A very thorough guide on Python HTTP Web Services, from ‘Dive into Python’
- Web Services Essentials: Chapter 6: WSDL Essentials“
- REST Web Services Security Resources
- Nice presentation about REST security. Do not skip!!