

def geocode(self, query, bounds=None, country=None, language=None, exactly_one=True, timeout=None):
    "\n        Geocode a location query.\n\n        :param string query: The query string to be geocoded; this must\n            be URL encoded.\n\n        :param string language: an IETF format language code (such as `es`\n            for Spanish or pt-BR for Brazilian Portuguese); if this is\n            omitted a code of `en` (English) will be assumed by the remote\n            service.\n\n        :param string bounds: Provides the geocoder with a hint to the region\n            that the query resides in. This value will help the geocoder\n            but will not restrict the possible results to the supplied\n            region. The bounds parameter should be specified as 4\n            coordinate points forming the south-west and north-east\n            corners of a bounding box. For example,\n            `bounds=-0.563160,51.280430,0.278970,51.683979`.\n\n        :param string country: Provides the geocoder with a hint to the\n            country that the query resides in. This value will help the\n            geocoder but will not restrict the possible results to the\n            supplied country. The country code is a 3 character code as\n            defined by the ISO 3166-1 Alpha 3 standard.\n\n        :param bool exactly_one: Return one result or a list of results, if\n            available.\n\n        :param int timeout: Time, in seconds, to wait for the geocoding service\n            to respond before raising a :class:`geopy.exc.GeocoderTimedOut`\n            exception. Set this only if you wish to override, on this call\n            only, the value set during the geocoder's initialization.\n\n        "
    params = {
        'key': self.api_key,
        'q': (self.format_string % query),
    }
    if bounds:
        query['bounds'] = bounds
    if language:
        params['language'] = language
    if country:
        params['country'] = country
    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)

dataset/ETHPy150Open geopy/geopy/geopy/geocoders/opencage.py OpenCage.geocode/VarMisuse@63/660 `params`->`query`