Add stub code for Python. Add tests for Rest API