class_docstr: Geocoder using the ERSI ArcGIS API.
  
  Documentation at:
      https://developers.arcgis.com/rest/geocode/api-reference/overview-world-geocoding-service.htm
class_docstr_tok: ["Geocoder","using","the","ERSI","ArcGIS","API",".","Documentation","at",":","https",":","\/\/developers.arcgis.com\/rest\/geocode\/api-reference\/overview-world-geocoding-service.htm"]
docstr: :param str username: ArcGIS username. Required if authenticated
      mode is desired.
  
  :param str password: ArcGIS password. Required if authenticated
      mode is desired.
  
  :param str referer: Required if authenticated mode is desired.
      `Referer` HTTP header to send with each request,
      e.g., ``'http://www.example.com'``. This is tied to an issued token,
      so fielding queries for multiple referrers should be handled by
      having multiple ArcGIS geocoder instances.
  
  :param int token_lifetime: Desired lifetime, in minutes, of an
      ArcGIS-issued token.
  
  :param str scheme:
      See :attr:`geopy.geocoders.options.default_scheme`.
      If authenticated mode is in use, it must be ``'https'``.
  
  :param int timeout:
      See :attr:`geopy.geocoders.options.default_timeout`.
  
  :param dict proxies:
      See :attr:`geopy.geocoders.options.default_proxies`.
  
  :param str user_agent:
      See :attr:`geopy.geocoders.options.default_user_agent`.
  
  :type ssl_context: :class:`ssl.SSLContext`
  :param ssl_context:
      See :attr:`geopy.geocoders.options.default_ssl_context`.
  
  :param callable adapter_factory:
      See :attr:`geopy.geocoders.options.default_adapter_factory`.
  
      .. versionadded:: 2.0
  
  :param str auth_domain: Domain where the target ArcGIS auth service
      is hosted. Used only in authenticated mode (i.e. username,
      password and referer are set).
  
  :param str domain: Domain where the target ArcGIS service
      is hosted.
docstr_tok: [":","param","str","username",":","ArcGIS","username",".","Required","if","authenticated","mode","is","desired",".",":","param","str","password",":","ArcGIS","password",".","Required","if","authenticated","mode","is","desired",".",":","param","str","referer",":","Required","if","authenticated","mode","is","desired",".","`","Referer","`","HTTP","header","to","send","with","each","request",",","e.g.",",","``","'http",":","\/\/www.example.com","'","``",".","This","is","tied","to","an","issued","token",",","so","fielding","queries","for","multiple","referrers","should","be","handled","by","having","multiple","ArcGIS","geocoder","instances",".",":","param","int","token_lifetime",":","Desired","lifetime",",","in","minutes",",","of","an","ArcGIS-issued","token",".",":","param","str","scheme",":","See",":","attr",":","`","geopy.geocoders.options.default_scheme","`",".","If","authenticated","mode","is","in","use",",","it","must","be","``","'https","'","``",".",":","param","int","timeout",":","See",":","attr",":","`","geopy.geocoders.options.default_timeout","`",".",":","param","dict","proxies",":","See",":","attr",":","`","geopy.geocoders.options.default_proxies","`",".",":","param","str","user_agent",":","See",":","attr",":","`","geopy.geocoders.options.default_user_agent","`",".",":","type","ssl_context",":",":","class",":","`","ssl.SSLContext","`",":","param","ssl_context",":","See",":","attr",":","`","geopy.geocoders.options.default_ssl_context","`",".",":","param","callable","adapter_factory",":","See",":","attr",":","`","geopy.geocoders.options.default_adapter_factory","`",".","..","versionadded",":",":","2.0",":","param","str","auth_domain",":","Domain","where","the","target","ArcGIS","auth","service","is","hosted",".","Used","only","in","authenticated","mode","(","i.e",".","username",",","password","and","referer","are","set",")",".",":","param","str","domain",":","Domain","where","the","target","ArcGIS","service","is","hosted","."]
code: def __init__(
      self,
      username=None,
      password=None,
      *,
      referer=None,
      token_lifetime=60,
      scheme=None,
      timeout=DEFAULT_SENTINEL,
      proxies=DEFAULT_SENTINEL,
      user_agent=None,
      ssl_context=DEFAULT_SENTINEL,
      adapter_factory=None,
      auth_domain="www.arcgis.com",
      domain="geocode.arcgis.com",
  ):
      """
  
      :param str username: ArcGIS username. Required if authenticated
          mode is desired.
  
      :param str password: ArcGIS password. Required if authenticated
          mode is desired.
  
      :param str referer: Required if authenticated mode is desired.
          `Referer` HTTP header to send with each request,
          e.g., ``'http://www.example.com'``. This is tied to an issued token,
          so fielding queries for multiple referrers should be handled by
          having multiple ArcGIS geocoder instances.
  
      :param int token_lifetime: Desired lifetime, in minutes, of an
          ArcGIS-issued token.
  
      :param str scheme:
          See :attr:`geopy.geocoders.options.default_scheme`.
          If authenticated mode is in use, it must be ``'https'``.
  
      :param int timeout:
          See :attr:`geopy.geocoders.options.default_timeout`.
  
      :param dict proxies:
          See :attr:`geopy.geocoders.options.default_proxies`.
  
      :param str user_agent:
          See :attr:`geopy.geocoders.options.default_user_agent`.
  
      :type ssl_context: :class:`ssl.SSLContext`
      :param ssl_context:
          See :attr:`geopy.geocoders.options.default_ssl_context`.
  
      :param callable adapter_factory:
          See :attr:`geopy.geocoders.options.default_adapter_factory`.
  
          .. versionadded:: 2.0
  
      :param str auth_domain: Domain where the target ArcGIS auth service
          is hosted. Used only in authenticated mode (i.e. username,
          password and referer are set).
  
      :param str domain: Domain where the target ArcGIS service
          is hosted.
      """
      super().__init__(
          scheme=scheme,
          timeout=timeout,
          proxies=proxies,
          user_agent=user_agent,
          ssl_context=ssl_context,
          adapter_factory=adapter_factory,
      )
      if username or password or referer:
          if not (username and password and referer):
              raise ConfigurationError(
                  "Authenticated mode requires username,"
                  " password, and referer"
              )
          if self.scheme != "https":
              raise ConfigurationError(
                  "Authenticated mode requires scheme of 'https'"
              )
  
      self.username = username
      self.password = password
      self.referer = referer
      self.auth_domain = auth_domain.strip("/")
      self.auth_api = "%s://%s%s" % (
          self.scheme,
          self.auth_domain,
          self.auth_path,
      )
  
      self.token_lifetime = token_lifetime * 60  # store in seconds
  
      self.domain = domain.strip("/")
      self.api = "%s://%s%s" % (
          self.scheme,
          self.domain,
          self.geocode_path,
      )
      self.reverse_api = "%s://%s%s" % (
          self.scheme,
          self.domain,
          self.reverse_path,
      )
  
      # Mutable state
      self.token = None
      self.token_expiry = None
  
file_path: geopy/geopy/geocoders/arcgis.py
imports: import json
  from functools import partial
  from time import time
  from urllib.parse import urlencode
  from geopy.exc import ConfigurationError, GeocoderAuthenticationFailure, GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder, _synchronized
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 1 to create a new ArcGIS object from inherited base classes: Geocoder with example: obj = ArcGIS(username, password)