Python Generic Database Wrapper