move db methods to new db api class
minimal flask web app