Added time out to python api.
Added timeout as a flag for script.