What's the easiest Python datagrid GUI (preferably with easy database hooks as well)?

T

tinnews

I want to write a fairly trivial database driven application, it will
basically present a few columns from a database, allow the user to add
and/or edit rows, recalculate the values in one column and write the
data back to the database.

I want to show the data and allow editing of the data in a datagrid as
being able to see adjacent/previous data will help a huge amount when
entering data.

So what toolkits are there out there for doing this sort of thing? A
GUI toolkit would be lovely (allowing layout etc.) but isn't
absolutely necessary.

I'm a reasonably experienced programmer and know python quite well
but I'm fairly much a beginner with event driven GUI stuff so I need
a user friendly framework.
 
I

Ian Kelly

I want to write a fairly trivial database driven application, it will
basically present a few columns from a database, allow the user to add
and/or edit rows, recalculate the values in one column and write the
data back to the database.

I want to show the data and allow editing of the data in a datagrid as
being able to see adjacent/previous data will help a huge amount when
entering data.

So what toolkits are there out there for doing this sort of thing? A
GUI toolkit would be lovely (allowing layout etc.) but isn't
absolutely necessary.

I'm a reasonably experienced programmer and know python quite well
but I'm fairly much a beginner with event driven GUI stuff so I need
a user friendly framework.

I've done something similar using wxPython and sqlalchemy. I use a
wxGrid with a wxGridTableBase subclass that keeps a sqlalchemy ORM
Session to access the database. The whole application is around 1300
lines of code but is probably more complex than what you need -- it
currently has five different views built in and supports some fancier
things like dropdown editing of foreign keys and many-to-many
relations; cells with type-ahead; filtering and sorting.

I don't know if that's the easiest way to do it, but I can at least
report that it can be done.
 
T

tinnews

Walter Hurry said:
I use wxglade to generate the GUI source for wxpython, and then write my
database code into the generated source for population of the grid and
responding to events.

I's very easy and painless. I mostly use Postgres (with Psycopg2) for the
database, but sometimes sqlite.

One big advantage for me is that I can go back to wxglade, change the
layout, regenerate the source and my own code is untouched.

Thanks, that sounds useful, I'll go and take a look at wxglade. I'll
probably use sqlite as it's very lightweight and can happily just run
on my desktop machine.
 
W

Wolfgang Keller

I want to write a fairly trivial database driven application, it will
basically present a few columns from a database, allow the user to add
and/or edit rows, recalculate the values in one column and write the
data back to the database.

I want to show the data and allow editing of the data in a datagrid as
being able to see adjacent/previous data will help a huge amount when
entering data.

So what toolkits are there out there for doing this sort of thing? A
GUI toolkit would be lovely (allowing layout etc.) but isn't
absolutely necessary.

I'm a reasonably experienced programmer and know python quite well
but I'm fairly much a beginner with event driven GUI stuff so I need
a user friendly framework.

This is becoming an FAQ.

The currently available (non-web) database application development
frameworks for Python are:

using wxPython:
Dabo http://www.dabodev.com
Defis http://sourceforge.net/projects/defis/ (Russian only)
GNUe http://www.gnuenterprise.org/

using PyQt:
Pypapi https://pypi.python.org/pypi/PyPaPi
Camelot http://www.python-camelot.com/
Qtalchemy http://www.qtalchemy.org/
Thyme http://clocksoft.co.uk/downloads/
Kexi http://www.kexi-project.org/

using PyGTK:
SQLkit http://sqlkit.argolinux.org/
Kiwi http://www.async.com.br/projects/kiwi/
Glom http://www.glom.org

Openoffice Base
http://www.openoffice.org/product/base.html
Libreoffice Base
http://www.libreoffice.org/features/base/

OpenERP http://www.openerp.org
Tryton http://www.tryton.org

Dabo (they're about to release 1.0 for Pycon), Pypapi, Camelot, SQLkit
seem to be the most actively developed and best documented ones.

OpenERP and Tryton are ERP systems that can also be used as
frameworks for non-ERP custom applications.

Apparently defunct:

Pythoncard http://pythoncard.sourceforge.net/
Boa Constructor http://boa-constructor.sourceforge.net/
Knoda http://www.knoda.org/
Rekall ?
Gemello http://abu.sourceforge.net/

Sincerely,

Wolfgang
 
S

Sibylle Koczian

Am 14.03.2013 14:24, schrieb Wolfgang Keller:
This is becoming an FAQ.

The currently available (non-web) database application development
frameworks for Python are:

using wxPython:
Dabo http://www.dabodev.com
Defis http://sourceforge.net/projects/defis/ (Russian only)
GNUe http://www.gnuenterprise.org/

using PyQt:
Pypapi https://pypi.python.org/pypi/PyPaPi
Camelot http://www.python-camelot.com/
Qtalchemy http://www.qtalchemy.org/
Thyme http://clocksoft.co.uk/downloads/
Kexi http://www.kexi-project.org/

using PyGTK:
SQLkit http://sqlkit.argolinux.org/
Kiwi http://www.async.com.br/projects/kiwi/
Glom http://www.glom.org

Openoffice Base
http://www.openoffice.org/product/base.html
Libreoffice Base
http://www.libreoffice.org/features/base/

OpenERP http://www.openerp.org
Tryton http://www.tryton.org

Dabo (they're about to release 1.0 for Pycon), Pypapi, Camelot, SQLkit
seem to be the most actively developed and best documented ones.

Very helpful collection, only one open question: which of them work with
Python 3? Not Dabo, sadly, because wxPython doesn't. And not Camelot
when I last looked (some weeks ago, though).

Will look at Pypapi and SQLkit.

Sibylle
 
W

Wolfgang Keller

Very helpful collection, only one open question: which of them work
with Python 3?

No clue, sorry. Given how many other modules are not yet compatible with
Python 3, I haven't investigated that yet.

wxwidgets/wxPython already has *just* made the switch to Cocoa (with
2.9) when Carbon support was dropped by Apple, and I don't have a clue
about the future of PyGTK (last update 2011, seems to have been
replaced by PyGObject).
Will look at Pypapi and SQLkit.

Frustrated with Dabo? Why?

Sincerely,

Wolfgang
 
S

Sibylle Koczian

Am 16.03.2013 21:30, schrieb Wolfgang Keller:Did look: SQLkit needs Python 2. Pypapi, from the link you gave: "The
new release of PyPaPi is written in Java. You can find more info in the
official site." On this official site - http://www.pypapi.org/ - I can't
find anything at all about using PyPaPi with Python.
Frustrated with Dabo? Why?
First and main reason: just because for my needs it's the _only_ package
that still forces me to keep a Python 2 installation.

Second reason: too often things suddenly break that worked before.
Writing to the Dabo list always helps, usually quite quickly, and that
list really is one of the friendliest and most helpful I know, but still
it's tiresome. Possibly I wouldn't care if English were my native
language, but it isn't and so writing to the list is work and no fun.

Sincerely
Sibylle
 
R

rusi

Am 16.03.2013 21:30, schrieb Wolfgang Keller:>> Will look at Pypapi and SQLkit.

Did look: SQLkit needs Python 2. Pypapi, from the link you gave: "The
new release of PyPaPi is written in Java. You can find more info in the
official site." On this official site -http://www.pypapi.org/- I can't
find anything at all about using PyPaPi with Python.


First and main reason: just because for my needs it's the _only_ package
that still forces me to keep a Python 2 installation.

Second reason: too often things suddenly break that worked before.
Writing to the Dabo list always helps, usually quite quickly, and that
list really is one of the friendliest and most helpful I know, but still
it's tiresome. Possibly I wouldn't care if English were my native
language, but it isn't and so writing to the list is work and no fun.

About your python I cant say, but your English looks/sounds as good as
a native's.
So dont waste your time getting that right; its good enough!
 
S

Sibylle Koczian

Am 17.03.2013 16:50, schrieb rusi:
About your python I cant say, but your English looks/sounds as good as
a native's.
So dont waste your time getting that right; its good enough!

Thank you. Flowers go to Dorothy L. Sayers, most of them. As far as Dabo
is concerned, at the moment I just have to know how to spell "crash" ...

Sibylle
 
W

Wolfgang Keller

As far as Dabo is concerned, at the moment I just have to know how to
spell "crash" ...

Seems like someone is in desperate need of what they call "release
management". X-(

Sincerely,

Wolfgang
 
W

Wolfgang Keller

Will look at Pypapi and SQLkit.
Did look: SQLkit needs Python 2.

Personally I would be more concerned about the apparent end-of-life of
PyGTK.
Pypapi, from the link you gave: "The new release of PyPaPi is written
in Java. You can find more info in the official site." On this
official site - http://www.pypapi.org/ - I can't find anything at all
about using PyPaPi with Python.

Unfortunately I have lost the URL for the documentation (tutorial
etc.) on the Python pages at www.pypapi.org. I'm afraid you'll have to
ask the author.

Pypapi, which is in production use in version 0.8, had been
re-implented in Java for some reason (paying customer?), and the design
changes have been back-ported to the Python implementation, yielding
the version 0.9, which is considered beta. I liked the approach of this
version, because it essentially only requires you to write the
declarative Sqlalchemy model, layout the forms in Qt Designer and
that's it. At about as little hand coding as possible.

If you don't mind source code of an example application being
essentially the only documentation, you can also look at Qtalchemy.

Sincerely,

Wolfgang
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top