Django-ROA (Resource Oriented Architecture)

Use Django's ORM to model remote API resources.

Not very clear? A picture is worth a thousand words:

In this diagram, the repository can be whatever you want, the only requirement is that it handles standard HTTP requests. As a developer all you have to do next is to use Django's ORM in your Django application (connectors are part of Django-ROA).

If you know how ActiveRecord works (from RoR), that's very close to it.

What problems does it solve?

Here are some ideas:

data handled by a data warehouse (SOA)

multiple database (as you can customize URLs per model)

schema-less backend (e.g. CouchDB speaks HTTP)

access a remote API with your own models (and with django's built-in admin!)

plug it on top of an RDF triple store (probably my next pony)

your crazy use-case? ;-)

A basic Twitter example

The complete example is available in source code examples. First let's define some models with URLs from Twitter's API: