web2py Python's web infrastructure recently added functionality to automatically generate a RESTful API based on data models defined through the database abstraction layer (DAL).
If you have an existing database schema, you need to model it using web2py DAL to use this new RESTful API functionality. To make this easier, there are scripts for automatically creating DAL website models from existing MySQL and PostgreSQL (scripts can probably be easily adapted for other databases as well).
Please note that the web2py web descriptor function (and this RESTful API functionality) can be used as a stand-alone module, regardless of the rest of the web2py structure (i.e. you can use it with other web frames or Python programs). In addition, DAL works not only with most relational databases, but also with the Google App Engine data store (and support is also added for CouchDB and MongoDB).
If you have any questions, feel free to ask on the web2py mailing list . We will also be happy to receive feedback on the new REST functionality.
Anthony
source share