add a python object factory