made python dictionary access database