class_docstr: Nominatim geocoder for OpenStreetMap data.
  
  Documentation at:
      https://nominatim.org/release-docs/develop/api/Overview/
  
  .. attention::
     Using Nominatim with the default `user_agent` is strongly discouraged,
     as it violates Nominatim's Usage Policy
     https://operations.osmfoundation.org/policies/nominatim/
     and may possibly cause 403 and 429 HTTP errors. Please make sure
     to specify a custom `user_agent` with
     ``Nominatim(user_agent="my-application")`` or by
     overriding the default `user_agent`:
     ``geopy.geocoders.options.default_user_agent = "my-application"``.
     An exception will be thrown if a custom `user_agent` is not specified.
class_docstr_tok: ["Nominatim","geocoder","for","OpenStreetMap","data",".","Documentation","at",":","https",":","\/\/nominatim.org\/release-docs\/develop\/api\/Overview\/","..","attention",":",":","Using","Nominatim","with","the","default","`","user_agent","`","is","strongly","discouraged",",","as","it","violates","Nominatim","'s","Usage","Policy","https",":","\/\/operations.osmfoundation.org\/policies\/nominatim\/","and","may","possibly","cause","403","and","429","HTTP","errors",".","Please","make","sure","to","specify","a","custom","`","user_agent","`","with","``","Nominatim","(","user_agent=","''","my-application","''",")","``","or","by","overriding","the","default","`","user_agent","`",":","``","geopy.geocoders.options.default_user_agent","=","``","my-application","''","``",".","An","exception","will","be","thrown","if","a","custom","`","user_agent","`","is","not","specified","."]
docstr: :param int timeout:
      See :attr:`geopy.geocoders.options.default_timeout`.
  
  :param dict proxies:
      See :attr:`geopy.geocoders.options.default_proxies`.
  
  :param str domain: Domain where the target Nominatim service
      is hosted.
  
  :param str scheme:
      See :attr:`geopy.geocoders.options.default_scheme`.
  
  :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
docstr_tok: [":","param","int","timeout",":","See",":","attr",":","`","geopy.geocoders.options.default_timeout","`",".",":","param","dict","proxies",":","See",":","attr",":","`","geopy.geocoders.options.default_proxies","`",".",":","param","str","domain",":","Domain","where","the","target","Nominatim","service","is","hosted",".",":","param","str","scheme",":","See",":","attr",":","`","geopy.geocoders.options.default_scheme","`",".",":","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"]
code: def __init__(
      self,
      *,
      timeout=DEFAULT_SENTINEL,
      proxies=DEFAULT_SENTINEL,
      domain=_DEFAULT_NOMINATIM_DOMAIN,
      scheme=None,
      user_agent=None,
      ssl_context=DEFAULT_SENTINEL,
      adapter_factory=None
      # Make sure to synchronize the changes of this signature in the
      # inheriting classes (e.g. PickPoint).
  ):
      """
  
      :param int timeout:
          See :attr:`geopy.geocoders.options.default_timeout`.
  
      :param dict proxies:
          See :attr:`geopy.geocoders.options.default_proxies`.
  
      :param str domain: Domain where the target Nominatim service
          is hosted.
  
      :param str scheme:
          See :attr:`geopy.geocoders.options.default_scheme`.
  
      :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
      """
      super().__init__(
          scheme=scheme,
          timeout=timeout,
          proxies=proxies,
          user_agent=user_agent,
          ssl_context=ssl_context,
          adapter_factory=adapter_factory,
      )
  
      self.domain = domain.strip("/")
  
      if (
          self.domain == _DEFAULT_NOMINATIM_DOMAIN
          and self.headers["User-Agent"] in _REJECTED_USER_AGENTS
      ):
          raise ConfigurationError(
              'Using Nominatim with default or sample `user_agent` "%s" is '
              "strongly discouraged, as it violates Nominatim's ToS "
              "https://operations.osmfoundation.org/policies/nominatim/ "
              "and may possibly cause 403 and 429 HTTP errors. "
              "Please specify a custom `user_agent` with "
              '`Nominatim(user_agent="my-application")` or by '
              "overriding the default `user_agent`: "
              '`geopy.geocoders.options.default_user_agent = "my-application"`.'
              % self.headers["User-Agent"]
          )
  
      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,
      )
  
file_path: geopy/geopy/geocoders/nominatim.py
imports: import collections.abc
  from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import ConfigurationError, GeocoderQueryError
  from geopy.geocoders.base import _DEFAULT_USER_AGENT, DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 1 to create a new Nominatim object from inherited base classes: Geocoder with example: obj = Nominatim()