Had a better idea about how to call deploy.py which simplifies its implementation.