def geocode(self, query, exactly_one=True, timeout=None): # pylint: disable=W0221
        params = {
            'q': query,
            'username': self.username
        }
        if self.country_bias:
            params['countryBias'] = self.country_bias
        if exactly_one is True:
            params['maxRows'] = 1
        url = "?".join((self.api, urlencode(params)))
        logger.debug("%s.geocode: %s", self.__class__.__name__, url)
        return self._parse_json(
            self._call_geocoder(url, timeout=timeout),
            exactly_one,
        )
Geocode a location query.
dataset/ETHPy150Open geopy/geopy/geopy/geocoders/geonames.py/GeoNames.geocode