Changes

Jump to: navigation, search

Simple Access API

8 bytes added, 05:14, 22 June 2009
m
format
As of GRAMPS version 3.0, a database API directed to plugin writers is available, The Simple Access API, accompanied with a Simple Document API for easy presentation of the data. [[Category:Developers/General]][[Category:Developers/Tutorials]]
==Introduction==
The normal database routines are optimized for low memory usage, and ifused properly, will take up almost no memory. This is key when usinglarge databases. Typically, instead of maintaining dictionaries or listsof objects, we can use the database "handles", and access the data onlywhen explicitly needed. This memory efficiency comes at the cost ofbeing fairly complicated to use.
The simplified API hides most of the complexity. Full objects arereturned, so you can easily consume a lot of memory with largedatabases. The routines themselves do not consume a significant amountof memory, but if you decided to keep your own lists or dictionaries ofdata, you will consume memory quickly.
This class is specifically constructed for use in the plugins, or to make [[Quick Reports|quick reports]] (available in the context menu's).
#print something to terminal
print sdb.name(child),sdb.gender(child), sdb.birth_date(child))
 
[[Category:Developers/General]]
[[Category:Developers/Tutorials]]
920
edits

Navigation menu