1. Jon Romero
  2. pyActiverecord

Source

pyActiverecord /

Filename Size Date modified Message
592 B
1.4 KB
This is a rough implementation of Rails' Activerecord in Python.
It uses metaprogramming a lot and creates dynamic queries.

I think that Rails' activerecord is briliant for everyday things
and I needed something easy to hack and extend.

Now, it's using DAL from web2py (http://web2py.com) but
you can create/overload functions like _find and use your favorite
database abstraction layer.

For the time being, only find_by is creating dynamic queries 
(but the architecture is there).

So, you can do stuff like this:

> user = User.find_by_name("Jon")

and you'll get an array of the users