Template for a python database class using the Borg design pattern