

Dejavu, a pythonic ORM (PyCon presentation) - olifante
http://pycon.blip.tv/file/1949237/
Very interesting presentation! Dejavu is an ORM similar to SQLAlchemy and Django Models. It has a lovely pythonic syntax for doing queries with lambda expressions, e.g.:<p>box.recall(Comic, lambda c: 'Hob' in c.Title or '#' in c.Title)<p>Instead of for instance Django's<p>Comic.objects.filter(Title__contains='Hob') | Comic.objects.filter(Title__contains='#')<p>I also loved the approach to converting the python queries to SQL code: Dejavu converts the python queries into an AST, which is then deparsed into the desired SQL dialect, an approach that apparently was used long ago by Glorp, a Smalltalk ORM.<p>Dejavu can also work with non-relational backends, such as flatfiles, LDAP stores, memcache, RAM and even the Python shelve.<p>In the question round, Robert also showed a very simple syntax for joins:<p>Table1 &#38; Table2 represents an inner join. Table1 | Table2 represents an outer join. Table1 &#60;&#60; Table2 represents a left join.<p>One question that was left unanswered was whether Dejavu supports the distributed key-value stores that are becoming increasingly popular, such as CouchDB, Amazon S3 and Amazon SimpleDB.
======
olifante
Very interesting presentation on Dejavu, an ORM similar to SQLAlchemy and
Django Models. It has a lovely pythonic syntax for doing queries with lambda
expressions, e.g.:

box.recall(Comic, lambda c: 'Hob' in c.Title or '#' in c.Title)

Instead of for instance Django's

Comic.objects.filter(Title__contains='Hob') |
Comic.objects.filter(Title__contains='#')

I also loved the approach to converting the python queries to SQL code: Dejavu
converts the python queries into an AST, which is then deparsed into the
desired SQL dialect, an approach that apparently was used long ago by Glorp, a
Smalltalk ORM.

Dejavu can also work with non-relational backends, such as flatfiles, LDAP
stores, memcache, RAM and even the Python shelve.

In the question round, Robert also showed a very simple syntax for joins:

Table1 & Table2 represents an inner join. Table1 | Table2 represents an outer
join. Table1 << Table2 represents a left join.

One question that was left unanswered was whether Dejavu supports the
distributed key-value stores that are becoming increasingly popular, such as
CouchDB, Amazon S3 and Amazon SimpleDB.

