need python script to start,stop and check job status in jenkins

need python script to start,stop and check job status in jenkins
V ThrusherAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Just to be sure:

You want to run a python script on your PC, that connects to jenkins' remote API in order to control jenkins?

Unfortunately I do not have a jenkins server to test with, so I can't really help.

However you might have a look at the python module python jenkins ( it should be the module to use to connect to a jenkins server.

if you have problems installing the module or if you have some error messages I might be able to help
V ThrusherAuthor Commented:
yes, i want to run python script from my pc to connect to jenkins in remote. Thanks for the response.  I'm new to python, so do you have any code that i can work?
The steps to perform:

1.) Install python on your PC
you could check I'd recommend to download python3.

2.) Install the module python-jenkins on your PC
not sure whether you're running on windows or linux or something else.
in a cmd window or shell window you should run
pip install python-jenkins
Depending on the OS / whether you have root privileges or want to run your code in a virtualenv there might be subtle differences.

3.) write your script and see if it does what you want.

Let's see where you are at the moment and progress step by step

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
V ThrusherAuthor Commented:
okay sure
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.