class_docstr: Geocoder using the Base Adresse Nationale France API.
  
  Documentation at:
      https://adresse.data.gouv.fr/api
class_docstr_tok: ["Geocoder","using","the","Base","Adresse","Nationale","France","API",".","Documentation","at",":","https",":","\/\/adresse.data.gouv.fr\/api"]
docstr: Return a location point by address.
  
  :param str query: The address or query you wish to geocode.
  
  :param int limit: Defines the maximum number of items in the
      response structure. If not provided and there are multiple
      results the BAN API will return 5 results by default.
      This will be reset to one if ``exactly_one`` is True.
  
  :param bool exactly_one: Return one result or a list of results, if
      available.
  
  :param int timeout: Time, in seconds, to wait for the geocoding service
      to respond before raising a :class:`geopy.exc.GeocoderTimedOut`
      exception. Set this only if you wish to override, on this call
      only, the value set during the geocoder's initialization.
  
  :rtype: ``None``, :class:`geopy.location.Location` or a list of them, if
      ``exactly_one=False``.
docstr_tok: ["Return","a","location","point","by","address",".",":","param","str","query",":","The","address","or","query","you","wish","to","geocode",".",":","param","int","limit",":","Defines","the","maximum","number","of","items","in","the","response","structure",".","If","not","provided","and","there","are","multiple","results","the","BAN","API","will","return","5","results","by","default",".","This","will","be","reset","to","one","if","``","exactly_one","``","is","True",".",":","param","bool","exactly_one",":","Return","one","result","or","a","list","of","results",",","if","available",".",":","param","int","timeout",":","Time",",","in","seconds",",","to","wait","for","the","geocoding","service","to","respond","before","raising","a",":","class",":","`","geopy.exc.GeocoderTimedOut","`","exception",".","Set","this","only","if","you","wish","to","override",",","on","this","call","only",",","the","value","set","during","the","geocoder","'s","initialization",".",":","rtype",":","``","None","``",",",":","class",":","`","geopy.location.Location","`","or","a","list","of","them",",","if","``","exactly_one=False","``","."]
code: def geocode(
      self,
      query,
      *,
      limit=None,
      exactly_one=True,
      timeout=DEFAULT_SENTINEL,
  ):
      """
      Return a location point by address.
  
      :param str query: The address or query you wish to geocode.
  
      :param int limit: Defines the maximum number of items in the
          response structure. If not provided and there are multiple
          results the BAN API will return 5 results by default.
          This will be reset to one if ``exactly_one`` is True.
  
      :param bool exactly_one: Return one result or a list of results, if
          available.
  
      :param int timeout: Time, in seconds, to wait for the geocoding service
          to respond before raising a :class:`geopy.exc.GeocoderTimedOut`
          exception. Set this only if you wish to override, on this call
          only, the value set during the geocoder's initialization.
  
      :rtype: ``None``, :class:`geopy.location.Location` or a list of them, if
          ``exactly_one=False``.
  
      """
  
      params = {
          "q": query,
      }
  
      if limit is not None:
          params["limit"] = limit
  
      url = "?".join((self.geocode_api, urlencode(params)))
  
      logger.debug("%s.geocode: %s", self.__class__.__name__, url)
      callback = partial(self._parse_json, exactly_one=exactly_one)
      return self._call_geocoder(url, callback, timeout=timeout)
  
file_path: geopy/geopy/geocoders/banfrance.py
imports: from functools import partial
  from urllib.parse import urlencode
  from geopy.geocoders.base import DEFAULT_SENTINEL, Geocoder
  from geopy.location import Location
  from geopy.util import logger
label_desc: Use image node_id 2 for calling the BANFrance obj's underlying member method code with example usage: obj.geocode(query) and returns: self