python obj converter