Add API example in Python