Updated example of Python API [ci skip]