GNOME 3635 Published by

Dan Kasak has announced the first usable version of gtk4-db-binder, a Python library that facilitates the automation of binding a database table to a form or a datasheet. The functionality encompasses the detection of primary keys, the generation of SQL for insert, update, and delete statements, the management of auto-incrementing primary keys, and the creation of a recordset toolbar. The system accommodates various database backends and allows for bundling in a parent/child relationship. The project is presently undergoing active development, with intentions to host data-centric desktop applications and transition an ETL framework.



gtk4-db-binder - first usable release

Hi all. I’m please to announce the first usable version of gtk4-db-binder. This python library automates the binding of a database table to either a ‘form’ ( consisting of gtk builder-generated widgets ) or a datasheet ( an auto-generated GtkColumnView ).

Current functionality includes:

  • Detection of primary keys
  • Generating SQL for insert, update, delete statements
  • Handling auto-incrementing primary keys
  • Generating a ‘recordset toolbar’ with buttons for insert, undo, delete, apply operations ( both form and datasheet )
  • Support for multiple database backends ( postgres, mysql, sqlite, oracle - partial ), with more simple to add
  • Binding multiple gtk4-db-binder objects together in a parent/child relationship, so the child gets requeried when the parent IDs update, and foreign keys are automatically set when inserting into the child
  • DropDrop support in both form and datasheet

Most of the testing so far as been against SQLite ( the example app uses SQLite ) and Postgres. While I won’t guarantee there are no bugs, the scope for “catastrophic” errors like accidentally updating an entire table is very slim.

The project is in active development, and I plan to keep it that way. I will host a bunch of data-centric desktop applications ( I’m a software + data engineer ) on top of this library going forwards. My other main project at this point is porting my ETL framework from perl-gtk3 to python-gtk4. This will drive ongoing development and testing of gtk4-db-binder.

Please try it out and let me know what you think

Gtk4_db_binder

Release Announcement: gtk4-db-binder - first usable release