ANN: PyDAO - Python Hibernate-like Object-Relational Mapper

Luis M. González luismgz at gmail.com
Wed Jun 27 16:43:55 EDT 2007


On Jun 27, 4:08 pm, cieslak.dari... at gmail.com wrote:
> PyDAO is very thin object-relational mapper similar to Hibernate (but
> much simpler). It's created to speed-up application development. It's
> very simple, but powerful, based on POPO (Plain Old Python Objects).
>
>  http://aplikacja.info/PyDAO.html
>
> Main features:
>
>  - can use any database that has DB-API interface (MySQLdb, psycopg
>    tested)
>  - can work without database at all (useful for early phases of
>    development)
>  - speeds up unit testing (dedicated in memory database)
>
> What is not handled:
>
>  - automatic scheme generation
>  - separate query language
>  - automated handling of associations (replaced by filtering by
>    foreign keys)
>
> Here's an example how to use PyDAO:
>
>     class User:
>         def __init__(self):
>             self.id = None
>             self.login = None
>             self.password = None
>
>     dao = pydao.InMemoryDao()
>
>     # filling database
>     user = User()
>     user.login = "user1"
>     user.password = "roh8OoPh"
>     dao.save(user)
>
>     # filtering based on example
>     userSearch = User()
>     userSearch.login = "user1"
>     userList = dao.list(userSearch)
>
>     # updating
>     user.password = "eew8Me8g"
>     dao.update(user)
>
> Enjoy!
>
> --
> Dariusz Cieslakhttp://aplikacja.info- custom software systems


Interesting, but The link to AbstractDaoTest.py gives me an error
message...




More information about the Python-list mailing list