Welcome to RestORM

Build Status

RestORM allows you to interact with resources as if they were objects (object relational mapping), mock an entire API and incorporate custom client logic.

Description

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.

Features

  • Object relational mapping of API resources (Django-like but does not depend on Django at all).
  • Flexible client architecture that can be used with your own or third party clients (like oauth).
  • Extensive mocking module allows you to mock API responses, or even complete API’s.
  • Examples for Twitter and Flickr API.

Installation

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

Contribute

  1. Get the code from Github:

    $ git clone git://github.com/joeribekker/restorm.git
  2. Create and activate a virtual environment:

    $ cd restorm
    $ virtualenv .
    $ source bin/activate
  3. Setup the project for development:

    $ python setup.py develop
  4. Start hacking!

Testing

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.

Table Of Contents

Next topic

Tutorial

This Page