开发者

Python: map widgets to database for reading and editing it

I am relatively new to database GUI programming, and I want to make a simple app in Python, which allows user to access and edit database. I want to view/edit tables and specific records plus generate some specific reports about stored data. For example, if we have a table with employees name and position, it should allow to edit name and select position from list and immediately change database according to changes. For one employee record it should output name and, again give a selectable list of positions. Also, it should have a dialog to add employees.

So, is there a way to create widgets for data开发者_如何转开发 tables and specific records which allows to output and edit data with automatic changes in database? I want to reduce the need for writing methods, which look at changes in view and reflect them at model.

I am using PyQt for writing GUI. Solutions for SQL, or ORMs like SQLAlchemy would both be fine.


You can use the Qt Database GUI Layer.
If you want to use SQLAlchemy too, you can take a look at Camelot.

UPDATE
A good introduction to the Qt Database GUI Layer is chapter 15 of the book "Rapid GUI Programming with Python and Qt".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜