added endpoints support to python code