Authenticate with Jenkins using username, password, or API token
masterWhen connecting to a Jenkins instance that has authentication enabled, provide the username and password (or an API token) to the Jenkins constructor.
Tip: It is recommended to use an API Token instead of a password. You can generate an API token in Jenkins under Configure > API Token in your user profile page.
from jenkinsapi.jenkins import Jenkins
# Using username and password/API token
J = Jenkins('http://localhost:8080', username='your_user', password='your_password_or_token')