Added api-example.py

I have Added a simple api-example for python.