More beauty for Midgard or midgard-python in action
Posted on 2007-05-04 13:37:18 EEST.
Some day I had read about beauty and a Python. And yesterday I though "Why there's no Python's beauty for Midgard?" Python C API is very well documented so I couldn't wait any longer. I started with MidgardDBObject, MidgardObject, MidgardConfig and MidgardConnection base classes... and commited initial bindings.
About two months ago I wrote about creating Midgard unified configuration file and SQlite based personal database using PHP bindings.
Today I can do the same with Python.
import gobject
import midgard
config = midgard.config()
config.set_property('dbtype', 'SQLite')
config.set_property('database', 'midgard-test')
if config.save_file("midgard-test", 1):
print "Configuration file created successfuly!"
Looks promising :)