FAQ

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...

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
grouppython-list @
categoriespython
postedJun 27, '07 at 7:08p
activeJun 27, '07 at 8:43p
posts2
users2
websitepython.org

People

Translate

site design / logo © 2022 Grokbase