simple orm code written in python