RestORM allows you to interact with resources as if they were objects (object relational mapping), mock an entire API and incorporate custom client logic.
RestORM structures the way you access a RESTful API and allows you to access related resources. On top of that, you can easily mock an entire API and replace the real client with a mock version in unit tests. RestORM is very extensible but offers many functionalities out of the box to get up and running quickly.
Currently, RestORM works on Python 2.5+ with Python 3 support on its way.
RestORM is on PyPI, so you can simply use:
$ pip install restorm
If you want the latest development version, get the code from Github:
$ pip install -e git+git://github.com/joeribekker/restorm.git#egg=restorm
Get the code from Github:
$ git clone git://github.com/joeribekker/restorm.git
Create and activate a virtual environment:
$ cd restorm
$ virtualenv .
$ source bin/activate
Setup the project for development:
$ python setup.py develop
Start hacking!
RestORM has a whooping 90% test coverage. Although reaching 100% is not a goal by itself, I consider unit testing to be essential during development.
Performing the unit tests yourself:
pip install nose
python setup.py nosetest
Note
Until a version 1.0 release, backwards incompatible changes may be introduced in future 0.x versions.