Rewriting deploy scripts update functionality from bash into python scripts method