class_docstr: GeoNames geocoder.
  
  Documentation at:
      http://www.geonames.org/export/geonames-search.html
  
  Reverse geocoding documentation at:
      http://www.geonames.org/export/web-services.html#findNearbyPlaceName
class_docstr_tok: ["GeoNames","geocoder",".","Documentation","at",":","http",":","\/\/www.geonames.org\/export\/geonames-search.html","Reverse","geocoding","documentation","at",":","http",":","\/\/www.geonames.org\/export\/web-services.html","#","findNearbyPlaceName"]
docstr: :param str username: GeoNames username, required. Sign up here:
      http://www.geonames.org/login
  
  :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 scheme:
      See :attr:`geopy.geocoders.options.default_scheme`. Note that
      at the time of writing GeoNames doesn't support `https`, so
      the default scheme is `http`. The value of
      :attr:`geopy.geocoders.options.default_scheme` is not respected.
      This parameter is present to make it possible to switch to
      `https` once GeoNames adds support for it.
  
  :param str domain: base api domain
  
      .. versionadded:: 2.4
docstr_tok: [":","param","str","username",":","GeoNames","username",",","required",".","Sign","up","here",":","http",":","\/\/www.geonames.org\/login",":","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","scheme",":","See",":","attr",":","`","geopy.geocoders.options.default_scheme","`",".","Note","that","at","the","time","of","writing","GeoNames","does","n't","support","`","https","`",",","so","the","default","scheme","is","`","http","`",".","The","value","of",":","attr",":","`","geopy.geocoders.options.default_scheme","`","is","not","respected",".","This","parameter","is","present","to","make","it","possible","to","switch","to","`","https","`","once","GeoNames","adds","support","for","it",".",":","param","str","domain",":","base","api","domain","..","versionadded",":",":","2.4"]
code: def __init__(
      self,
      username,
      *,
      timeout=DEFAULT_SENTINEL,
      proxies=DEFAULT_SENTINEL,
      user_agent=None,
      ssl_context=DEFAULT_SENTINEL,
      adapter_factory=None,
      scheme="http",
      domain="api.geonames.org",
  ):
      """
  
      :param str username: GeoNames username, required. Sign up here:
          http://www.geonames.org/login
  
      :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 scheme:
          See :attr:`geopy.geocoders.options.default_scheme`. Note that
          at the time of writing GeoNames doesn't support `https`, so
          the default scheme is `http`. The value of
          :attr:`geopy.geocoders.options.default_scheme` is not respected.
          This parameter is present to make it possible to switch to
          `https` once GeoNames adds support for it.
  
      :param str domain: base api domain
  
          .. versionadded:: 2.4
      """
      super().__init__(
          scheme=scheme,
          timeout=timeout,
          proxies=proxies,
          user_agent=user_agent,
          ssl_context=ssl_context,
          adapter_factory=adapter_factory,
      )
      self.username = username
  
      self.api = "%s://%s%s" % (self.scheme, domain, self.geocode_path)
      self.api_reverse = "%s://%s%s" % (
          self.scheme,
          domain,
          self.reverse_path,
      )
      self.api_reverse_nearby = "%s://%s%s" % (
          self.scheme,
          domain,
          self.reverse_nearby_path,
      )
      self.api_timezone = "%s://%s%s" % (
          self.scheme,
          domain,
          self.timezone_path,
      )
  
file_path: geopy/geopy/geocoders/geonames.py
imports: from functools import partial
  from urllib.parse import urlencode
  from geopy.exc import GeocoderAuthenticationFailure, GeocoderInsufficientPrivileges, GeocoderQueryError, GeocoderQuotaExceeded, GeocoderServiceError
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.timezone import ensure_pytz_is_installed, from_fixed_gmt_offset, from_timezone_name
  from geopy.util import logger
label_desc: Use image node_id 1 to create a new GeoNames object from inherited base classes: Geocoder with example: obj = GeoNames(username)