parameters: (self, server=None, options=None, basic_auth=None, oauth=None, jwt=None, kerberos=False, kerberos_options=None,
                   validate=False, get_server_info=True, async=False, logging=True, max_retries=3, proxies=None,
                   timeout=None, auth=None)
docstring: Construct a JIRA client instance.
  
          Without any arguments, this client will connect anonymously to the JIRA instance
          started by the Atlassian Plugin SDK from one of the 'atlas-run', ``atlas-debug``,
          or ``atlas-run-standalone`` commands. By default, this instance runs at
          ``http://localhost:2990/jira``. The ``options`` argument can be used to set the JIRA instance to use.
  
          Authentication is handled with the ``basic_auth`` argument. If authentication is supplied (and is
          accepted by JIRA), the client will remember it for subsequent requests.
  
          For quick command line access to a server, see the ``jirashell`` script included with this distribution.
  
          The easiest way to instantiate is using j = JIRA("https://jira.atlasian.com")
  
          :param options: Specify the server and properties this client will use. Use a dict with any
              of the following properties:
              * server -- the server address and context path to use. Defaults to ``http://localhost:2990/jira``.
              * rest_path -- the root REST path to use. Defaults to ``api``, where the JIRA REST resources live.
              * rest_api_version -- the version of the REST resources under rest_path to use. Defaults to ``2``.
              * agile_rest_path - the REST path to use for JIRA Agile requests. Defaults to ``greenhopper`` (old, private
                 API). Check `GreenHopperResource` for other supported values.
              * verify -- Verify SSL certs. Defaults to ``True``.
              * client_cert -- a tuple of (cert,key) for the requests library for client side SSL
              * check_update -- Check whether using the newest python-jira library version.
          :param basic_auth: A tuple of username and password to use when establishing a session via HTTP BASIC
          authentication.
          :param oauth: A dict of properties for OAuth authentication. The following properties are required:
              * access_token -- OAuth access token for the user
              * access_token_secret -- OAuth access token secret to sign with the key
              * consumer_key -- key of the OAuth application link defined in JIRA
              * key_cert -- private key file to sign requests with (should be the pair of the public key supplied to
              JIRA in the OAuth application link)
          :param kerberos: If true it will enable Kerberos authentication.
          :param kerberos_options: A dict of properties for Kerberos authentication. The following properties are possible:
              * mutual_authentication -- string DISABLED or OPTIONAL.
              Example kerberos_options structure: ``{'mutual_authentication': 'DISABLED'}``
          :param jwt: A dict of properties for JWT authentication supported by Atlassian Connect. The following
              properties are required:
              * secret -- shared secret as delivered during 'installed' lifecycle event
              (see https://developer.atlassian.com/static/connect/docs/latest/modules/lifecycle.html for details)
              * payload -- dict of fields to be inserted in the JWT payload, e.g. 'iss'
              Example jwt structure: ``{'secret': SHARED_SECRET, 'payload': {'iss': PLUGIN_KEY}}``
          :param validate: If true it will validate your credentials first. Remember that if you are accesing JIRA
              as anononymous it will fail to instanciate.
          :param get_server_info: If true it will fetch server version info first to determine if some API calls
              are available.
          :param async: To enable async requests for those actions where we implemented it, like issue update() or delete().
          :param timeout: Set a read/connect timeout for the underlying calls to JIRA (default: None)
          Obviously this means that you cannot rely on the return code when this is enabled.
          :param auth: Set a cookie auth token if this is required.
docstring_summary: Construct a JIRA client instance.
docstring_tokens: Construct a JIRA client instance .
function: def __init__(self, server=None, options=None, basic_auth=None, oauth=None, jwt=None, kerberos=False, kerberos_options=None,
                   validate=False, get_server_info=True, async=False, logging=True, max_retries=3, proxies=None,
                   timeout=None, auth=None):
          """Construct a JIRA client instance.
  
          Without any arguments, this client will connect anonymously to the JIRA instance
          started by the Atlassian Plugin SDK from one of the 'atlas-run', ``atlas-debug``,
          or ``atlas-run-standalone`` commands. By default, this instance runs at
          ``http://localhost:2990/jira``. The ``options`` argument can be used to set the JIRA instance to use.
  
          Authentication is handled with the ``basic_auth`` argument. If authentication is supplied (and is
          accepted by JIRA), the client will remember it for subsequent requests.
  
          For quick command line access to a server, see the ``jirashell`` script included with this distribution.
  
          The easiest way to instantiate is using j = JIRA("https://jira.atlasian.com")
  
          :param options: Specify the server and properties this client will use. Use a dict with any
              of the following properties:
              * server -- the server address and context path to use. Defaults to ``http://localhost:2990/jira``.
              * rest_path -- the root REST path to use. Defaults to ``api``, where the JIRA REST resources live.
              * rest_api_version -- the version of the REST resources under rest_path to use. Defaults to ``2``.
              * agile_rest_path - the REST path to use for JIRA Agile requests. Defaults to ``greenhopper`` (old, private
                 API). Check `GreenHopperResource` for other supported values.
              * verify -- Verify SSL certs. Defaults to ``True``.
              * client_cert -- a tuple of (cert,key) for the requests library for client side SSL
              * check_update -- Check whether using the newest python-jira library version.
          :param basic_auth: A tuple of username and password to use when establishing a session via HTTP BASIC
          authentication.
          :param oauth: A dict of properties for OAuth authentication. The following properties are required:
              * access_token -- OAuth access token for the user
              * access_token_secret -- OAuth access token secret to sign with the key
              * consumer_key -- key of the OAuth application link defined in JIRA
              * key_cert -- private key file to sign requests with (should be the pair of the public key supplied to
              JIRA in the OAuth application link)
          :param kerberos: If true it will enable Kerberos authentication.
          :param kerberos_options: A dict of properties for Kerberos authentication. The following properties are possible:
              * mutual_authentication -- string DISABLED or OPTIONAL.
              Example kerberos_options structure: ``{'mutual_authentication': 'DISABLED'}``
          :param jwt: A dict of properties for JWT authentication supported by Atlassian Connect. The following
              properties are required:
              * secret -- shared secret as delivered during 'installed' lifecycle event
              (see https://developer.atlassian.com/static/connect/docs/latest/modules/lifecycle.html for details)
              * payload -- dict of fields to be inserted in the JWT payload, e.g. 'iss'
              Example jwt structure: ``{'secret': SHARED_SECRET, 'payload': {'iss': PLUGIN_KEY}}``
          :param validate: If true it will validate your credentials first. Remember that if you are accesing JIRA
              as anononymous it will fail to instanciate.
          :param get_server_info: If true it will fetch server version info first to determine if some API calls
              are available.
          :param async: To enable async requests for those actions where we implemented it, like issue update() or delete().
          :param timeout: Set a read/connect timeout for the underlying calls to JIRA (default: None)
          Obviously this means that you cannot rely on the return code when this is enabled.
          :param auth: Set a cookie auth token if this is required.
          """
          # force a copy of the tuple to be used in __del__() because
          # sys.version_info could have already been deleted in __del__()
          self.sys_version_info = tuple([i for i in sys.version_info])
  
          if options is None:
              options = {}
              if server and hasattr(server, 'keys'):
                  warnings.warn(
                      "Old API usage, use JIRA(url) or JIRA(options={'server': url}, when using dictionary always use named parameters.",
                      DeprecationWarning)
                  options = server
                  server = None
  
          if server:
              options['server'] = server
          if async:
              options['async'] = async
  
          self.logging = logging
  
          self._options = copy.copy(JIRA.DEFAULT_OPTIONS)
  
          self._options.update(options)
  
          self._rank = None
  
          # Rip off trailing slash since all urls depend on that
          if self._options['server'].endswith('/'):
              self._options['server'] = self._options['server'][:-1]
  
          context_path = urlparse(self._options['server']).path
          if len(context_path) > 0:
              self._options['context_path'] = context_path
  
          self._try_magic()
  
          if oauth:
              self._create_oauth_session(oauth, timeout)
          elif basic_auth:
              self._create_http_basic_session(*basic_auth, timeout=timeout)
              self._session.headers.update(self._options['headers'])
          elif jwt:
              self._create_jwt_session(jwt, timeout)
          elif kerberos:
              self._create_kerberos_session(timeout, kerberos_options=kerberos_options)
          elif auth:
              self._create_cookie_auth(auth, timeout)
              validate = True  # always log in for cookie based auth, as we need a first request to be logged in
          else:
              verify = self._options['verify']
              self._session = ResilientSession(timeout=timeout)
              self._session.verify = verify
          self._session.headers.update(self._options['headers'])
  
          if 'cookies' in self._options:
              self._session.cookies.update(self._options['cookies'])
  
          self._session.max_retries = max_retries
  
          if proxies:
              self._session.proxies = proxies
  
          if validate:
              # This will raise an Exception if you are not allowed to login.
              # It's better to fail faster than later.
              user = self.session(auth)
              if user.raw is None:
                  auth_method = (
                      oauth or basic_auth or jwt or kerberos or auth or "anonymous"
                  )
                  raise JIRAError("Can not log in with %s" % str(auth_method))
  
          self.deploymentType = None
          if get_server_info:
              # We need version in order to know what API calls are available or not
              si = self.server_info()
              try:
                  self._version = tuple(si['versionNumbers'])
              except Exception as e:
                  logging.error("invalid server_info: %s", si)
                  raise e
              self.deploymentType = si.get('deploymentType')
          else:
              self._version = (0, 0, 0)
  
          if self._options['check_update'] and not JIRA.checked_version:
              self._check_update_()
              JIRA.checked_version = True
  
          self._fields = {}
          for f in self.fields():
              if 'clauseNames' in f:
                  for name in f['clauseNames']:
                      self._fields[name] = f['id']
function_tokens: def __init__ ( self , server = None , options = None , basic_auth = None , oauth = None , jwt = None , kerberos = False , kerberos_options = None , validate = False , get_server_info = True , async = False , logging = True , max_retries = 3 , proxies = None , timeout = None , auth = None ) : # force a copy of the tuple to be used in __del__() because # sys.version_info could have already been deleted in __del__() self . sys_version_info = tuple ( [ i for i in sys . version_info ] ) if options is None : options = { } if server and hasattr ( server , 'keys' ) : warnings . warn ( "Old API usage, use JIRA(url) or JIRA(options={'server': url}, when using dictionary always use named parameters." , DeprecationWarning ) options = server server = None if server : options [ 'server' ] = server if async : options [ 'async' ] = async self . logging = logging self . _options = copy . copy ( JIRA . DEFAULT_OPTIONS ) self . _options . update ( options ) self . _rank = None # Rip off trailing slash since all urls depend on that if self . _options [ 'server' ] . endswith ( '/' ) : self . _options [ 'server' ] = self . _options [ 'server' ] [ : - 1 ] context_path = urlparse ( self . _options [ 'server' ] ) . path if len ( context_path ) > 0 : self . _options [ 'context_path' ] = context_path self . _try_magic ( ) if oauth : self . _create_oauth_session ( oauth , timeout ) elif basic_auth : self . _create_http_basic_session ( * basic_auth , timeout = timeout ) self . _session . headers . update ( self . _options [ 'headers' ] ) elif jwt : self . _create_jwt_session ( jwt , timeout ) elif kerberos : self . _create_kerberos_session ( timeout , kerberos_options = kerberos_options ) elif auth : self . _create_cookie_auth ( auth , timeout ) validate = True # always log in for cookie based auth, as we need a first request to be logged in else : verify = self . _options [ 'verify' ] self . _session = ResilientSession ( timeout = timeout ) self . _session . verify = verify self . _session . headers . update ( self . _options [ 'headers' ] ) if 'cookies' in self . _options : self . _session . cookies . update ( self . _options [ 'cookies' ] ) self . _session . max_retries = max_retries if proxies : self . _session . proxies = proxies if validate : # This will raise an Exception if you are not allowed to login. # It's better to fail faster than later. user = self . session ( auth ) if user . raw is None : auth_method = ( oauth or basic_auth or jwt or kerberos or auth or "anonymous" ) raise JIRAError ( "Can not log in with %s" % str ( auth_method ) ) self . deploymentType = None if get_server_info : # We need version in order to know what API calls are available or not si = self . server_info ( ) try : self . _version = tuple ( si [ 'versionNumbers' ] ) except Exception as e : logging . error ( "invalid server_info: %s" , si ) raise e self . deploymentType = si . get ( 'deploymentType' ) else : self . _version = ( 0 , 0 , 0 ) if self . _options [ 'check_update' ] and not JIRA . checked_version : self . _check_update_ ( ) JIRA . checked_version = True self . _fields = { } for f in self . fields ( ) : if 'clauseNames' in f : for name in f [ 'clauseNames' ] : self . _fields [ name ] = f [ 'id' ]