moved python deploy code