Python module to access the OpenCage geocoding API

Overview

OpenCage Geocoding Module for Python

A Python module to access the OpenCage Geocoder.

Build Status / Code Quality / etc

PyPI version Downloads Versions GitHub contributors Build Status Kritika Analysis Status Twitter Follow

Usage

Supports Python 3.6 or newer. Use the older opencage 1.x releases if you need Python 2.7 support.

Install the module:

pip install opencage

Load the module:

from opencage.geocoder import OpenCageGeocode

Create an instance of the geocoder module, passing a valid OpenCage Data Geocoder API key as a parameter to the geocoder modules's constructor:

key = 'your-api-key-here'
geocoder = OpenCageGeocode(key)

Pass a string containing the query or address to be geocoded to the modules's geocode method:

query = "82 Clerkenwell Road, London"
result = geocoder.geocode(query)

You can add additional parameters:

result = geocoder.geocode('London', no_annotations=1, language='es')

You can use the proximity parameter to provide the geocoder with a hint:

result = geocoder.geocode('London', proximity='42.828576, -81.406643')
print(result[0]['formatted'])
# u'London, ON N6A 3M8, Canada'

Reverse geocoding

Turn a lat/long into an address with the reverse_geocode method:

results = geocoder.reverse_geocode(51.51024, -0.10303)

Exceptions

If anything goes wrong, then an exception will be raised:

  • InvalidInputError for non-unicode query strings
  • UnknownError if there's some problem with the API (bad results, 500 status code, etc)
  • RateLimitExceededError if you go past your rate limit

Copyright & Licencse

This software is copyright OpenCage GmbH. Please see LICENSE.txt

Who is OpenCage GmbH?

We run the OpenCage Geocoder. Learn more about us.

We also run Geomob, a series of regular meetups for location based service creators, where we do our best to highlight geoinnovation. If you like geo stuff, you will probably enjoy the Geomob podcast.

Comments
  • "ImportError: No module named opencage.geocoder"

    I just go through the sign up process and generate api key. For importing the api from python https://github.com/opencagedata/python-opencage-geocoder .I am getting an error "ImportError: No module named opencage.geocoder"

    opened by shihas1991 6
  • Require pyopenssl and add request backoff

    Require pyopenssl and add request backoff

    I have added a requirement for pyopenssl to the setup.py. The version is set to >=0.15.1 because that is the latest version that works with python 2.6 and 3.2 mentioned in the setup.py classifiers. pyopenssl 0.15.1 is quite old (April 2015) but I don't think that will be a problem.

    I tried installing the pyopenssl pip package in a plain docker container without OpenSSL installed and it failed as expected, so I think it's fair to assume this is all that's needed to ensure OpenSSL is present.

    opened by sbscully 4
  • Patch to enable use of optional paramters

    Patch to enable use of optional paramters

    Simply pass optional parameters as **kwargs, gets passed on to the request

    Ex.

    geocoder.reverse_geocode('')
    geocoder.reverse_geocode(lat, lon, no_annotations=1)
    g
    
    opened by CrazyPython 3
  • NameError: global name 'query_for_reverse_geocoding' is not defined

    NameError: global name 'query_for_reverse_geocoding' is not defined

    I get the error when I attempt a simple reverse geocode:

    ...from my geocode1.py:

    import sys from opencage.geocoder import OpenCageGeocode

    key = '...' geocoder = OpenCageGeocode(key)

    lat = sys.argv[1] lng = sys.argv[2] result2 = geocoder.reverse_geocode(lat, lng) print(result2) ...

    Then when I run: $ ./geocode1.py 39.26 -76.6739 Traceback (most recent call last): File "./geocode1.py", line 22, in result2 = geocoder.reverse_geocode(lat, lng) File "/Library/Python/2.7/site-packages/opencage-1.0.0-py2.7.egg/opencage/geocoder.py", line 147, in reverse_geocode return self.geocode(query_for_reverse_geocoding(lat, lng)) NameError: global name 'query_for_reverse_geocoding' is not defined

    opened by borbash 3
  • KeyNameError: building key in the components portion has become

    KeyNameError: building key in the components portion has become "unknown"

    When requesting the reverse geocoding information via https://api.opencagedata.com/geocode/v1/, in the components portion, the previsous key "building" now became "unknown". Capture

    opened by ghost 2
  • Remote end closed connection without response

    Remote end closed connection without response

    Hello!

    I have a problem using geocoder.geocode for many queries (ca. 1200) in a for-loop: It throws an error ("Remote end closed connection without response") and stops with a Segmentation fault. I have a free trial account, so I made sure to have a pause of 2 seconds after each query. Also, the total number of made queries was below the daily limit. In total, I made three attempts and each time the error was thrown after a different number of processed requests.

    Could you help me to find out why this could happen and how to avoid/solve it?

    Thank you in advance!

    Here is a code snippet to show how I made the requests:

    from opencage.geocoder import OpenCageGeocode
    geocoder = OpenCageGeocode('...') # my API key
    
    df = ... # table with locations
    
    for i in df.index:
            query  = df.loc[i,'Location']
            location = geocoder.geocode(query)
            sleep(2)
            # check and save the result
    

    Here is the output after the error is thrown:

    Traceback (most recent call last):
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
        chunked=chunked)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
        six.raise_from(e, None)
      File "<string>", line 2, in raise_from
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
        httplib_response = conn.getresponse()
      File "/usr/lib64/python3.7/http/client.py", line 1321, in getresponse
        response.begin()
      File "/usr/lib64/python3.7/http/client.py", line 296, in begin
        version, status, reason = self._read_status()
      File "/usr/lib64/python3.7/http/client.py", line 265, in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    http.client.RemoteDisconnected: Remote end closed connection without response
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/adapters.py", line 445, in send
        timeout=timeout
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 638, in urlopen
        _stacktrace=sys.exc_info()[2])
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/util/retry.py", line 367, in increment
        raise six.reraise(type(error), error, _stacktrace)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/packages/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 600, in urlopen
        chunked=chunked)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 384, in _make_request
        six.raise_from(e, None)
      File "<string>", line 2, in raise_from
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/urllib3/connectionpool.py", line 380, in _make_request
        httplib_response = conn.getresponse()
      File "/usr/lib64/python3.7/http/client.py", line 1321, in getresponse
        response.begin()
      File "/usr/lib64/python3.7/http/client.py", line 296, in begin
        version, status, reason = self._read_status()
      File "/usr/lib64/python3.7/http/client.py", line 265, in _read_status
        raise RemoteDisconnected("Remote end closed connection without"
    urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "parse_locs.py", line 131, in <module>
        if pandas.isnull(query_):
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/opencage/geocoder.py", line 118, in geocode
        response = requests.get(url, params=data)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/api.py", line 72, in get
        return request('get', url, params=params, **kwargs)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/api.py", line 58, in request
        return session.request(method=method, url=url, **kwargs)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/sessions.py", line 512, in request
        resp = self.send(prep, **send_kwargs)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/sessions.py", line 622, in send
        r = adapter.send(request, **kwargs)
      File "/home/valia/Work/venv_3/lib/python3.7/site-packages/requests/adapters.py", line 495, in send
        raise ConnectionError(err, request=request)
    requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
    Segmentation fault (core dumped)
    

    Edit: Typos

    opened by VGalata 2
  • Support request formats: xml and geojson

    Support request formats: xml and geojson

    opened by nate-bush 1
  • from opencage.geocoder import OpenCageGeocode not found

    from opencage.geocoder import OpenCageGeocode not found

    Traceback (most recent call last): File "C:\Users\hp\numberlocation\main.py", line 19, in from opencage.geocoder import OpenCageGeoCoder ImportError: cannot import name 'OpenCageGeoCoder' from 'opencage.geocoder' (C:\Users\hp\python 310\lib\site-packages\opencage\geocoder.py)

    opened by shubham-kumarpandey 1
  • rate is not in the response

    rate is not in the response

    Maybe a blunt question; Why is the rate not in the response when using a forward query, do I have to give any extra parameter to receive this info?;

    query:

    from opencage.geocoder import OpenCageGeocode
    geocoder = OpenCageGeocode('[APIpassword]
    address = 'Azalealaan 5701CM Helmond'
    geocoder.geocode(address)
    

    response:

    [{'annotations': {'DMS': {'lat': "51° 28' 38.32536'' N", 'lng': "5° 40' 20.22276'' E"}, 'MGRS': '31UFT8556706292', 'Maidenhead': 'JO21ul04qn', 'Mercator': {'x': 631435.778, 'y': 6672712.321}, 'OSM': {'edit_url': 'https://www.openstreetmap.org/edit?way=7142970#map=16/51.47731/5.67228', 'note_url': 'https://www.openstreetmap.org/note/new#map=16/51.47731/5.67228&layers=N', 'url': 'https://www.openstreetmap.org/?mlat=51.47731&mlon=5.67228#map=16/51.47731/5.67228'}, 'UN_M49': {'regions': {'EUROPE': '150', 'NL': '528', 'WESTERN_EUROPE': '155', 'WORLD': '001'}, 'statistical_groupings': ['MEDC']}, 'callingcode': 31, 'currency': {'alternate_symbols': [], 'decimal_mark': ',', 'html_entity': '&#x20AC;', 'iso_code': 'EUR', 'iso_numeric': '978', 'name': 'Euro', 'smallest_denomination': 1, 'subunit': 'Cent', 'subunit_to_unit': 100, 'symbol': '€', 'symbol_first': 0, 'thousands_separator': '.'}, 'flag': '🇳🇱', 'geohash': 'u1hhc54mjf9ddw676dst', 'qibla': 125.68, 'roadinfo': {'drive_on': 'right', 'road': 'Azalealaan', 'road_type': 'residential', 'speed_in': 'km/h'}, 'sun': {'rise': {'apparent': 1625974500, 'astronomical': 0, 'civil': 1625971800, 'nautical': 1625967780}, 'set': {'apparent': 1626033000, 'astronomical': 0, 'civil': 1626035700, 'nautical': 1626039720}}, 'timezone': {'name': 'Europe/Amsterdam', 'now_in_dst': 1, 'offset_sec': 7200, 'offset_string': '+0200', 'short_name': 'CEST'}, 'what3words': {'words': 'paths.smile.journals'}}, 'bounds': {'northeast': {'lat': 51.4777108, 'lng': 5.6741281}, 'southwest': {'lat': 51.4766618, 'lng': 5.6711463}}, 'components': {'ISO_3166-1_alpha-2': 'NL', 'ISO_3166-1_alpha-3': 'NLD', '_category': 'road', '_type': 'road', 'city': 'Helmond', 'continent': 'Europe', 'country': 'Netherlands', 'country_code': 'nl', 'neighbourhood': 'Beisterveld', 'political_union': 'European Union', 'postcode': '5701 CM', 'region': 'Netherlands', 'road': 'Azalealaan', 'road_type': 'residential', 'state': 'North Brabant', 'state_code': 'NB'}, 'confidence': 9, 'formatted': 'Azalealaan, 5701 CM Helmond, Netherlands', 'geometry': {'lat': 51.4773126, 'lng': 5.6722841}}, {'annotations': {'DMS': {'lat': "51° 28' 54.01200'' N", 'lng': "5° 39' 39.99600'' E"}, 'MGRS': '31UFT8477406748', 'Maidenhead': 'JO21tl95io', 'Mercator': {'x': 630191.883, 'y': 6673489.141}, 'OSM': {'note_url': 'https://www.openstreetmap.org/note/new#map=16/51.48167/5.66111&layers=N', 'url': 'https://www.openstreetmap.org/?mlat=51.48167&mlon=5.66111#map=16/51.48167/5.66111'}, 'UN_M49': {'regions': {'EUROPE': '150', 'NL': '528', 'WESTERN_EUROPE': '155', 'WORLD': '001'}, 'statistical_groupings': ['MEDC']}, 'callingcode': 31, 'currency': {'alternate_symbols': [], 'decimal_mark': ',', 'html_entity': '&#x20AC;', 'iso_code': 'EUR', 'iso_numeric': '978', 'name': 'Euro', 'smallest_denomination': 1, 'subunit': 'Cent', 'subunit_to_unit': 100, 'symbol': '€', 'symbol_first': 0, 'thousands_separator': '.'}, 'flag': '🇳🇱', 'geohash': 'u1hhbgfq3qved5m0mr3y', 'qibla': 125.67, 'roadinfo': {'drive_on': 'right', 'speed_in': 'km/h'}, 'sun': {'rise': {'apparent': 1625974500, 'astronomical': 0, 'civil': 1625971800, 'nautical': 1625967780}, 'set': {'apparent': 1626033000, 'astronomical': 0, 'civil': 1626035700, 'nautical': 1626039720}}, 'timezone': {'name': 'Europe/Amsterdam', 'now_in_dst': 1, 'offset_sec': 7200, 'offset_string': '+0200', 'short_name': 'CEST'}, 'what3words': {'words': 'youngest.speaker.anyway'}}, 'bounds': {'northeast': {'lat': 51.501278, 'lng': 5.7168505}, 'southwest': {'lat': 51.452526, 'lng': 5.623887}}, 'components': {'ISO_3166-1_alpha-2': 'NL', 'ISO_3166-1_alpha-3': 'NLD', '_category': 'place', '_type': 'city', 'continent': 'Europe', 'country': 'Netherlands', 'country_code': 'nl', 'county': 'Helmond', 'political_union': 'European Union', 'state': 'Noord-Brabant', 'state_code': 'NB', 'town': 'Helmond'}, 'confidence': 7, 'formatted': 'Helmond, Netherlands', 'geometry': {'lat': 51.48167, 'lng': 5.66111}}]
    
    opened by Dinges28 1
  • Check for quota

    Check for quota "402 Payment Required"

    The geocoder.py current checks only for HTTP response 429 "Too many requests" to raise the quota exceeded error. However, for me at least, the code OpenCage sends me is 402 "Payment required". The python module does not detect this alternative code and just gives me empty results list.

    Ideal fix would be to make this check more robust - check the JSON as well as the HTTP header. Here is a sample: "rate":{"limit":2500,"remaining":0,"reset":1439683200},"results":[],"status":{"code":402,"message":"quota exceeded"}, X-RateLimit-Remaining:"0"

    Note another handy feature would be the ability to query the geocoder object for the number of calls remaining and the reset time. This would allow the client to prioritise data to be parsed.

    opened by theconor 1
  • PyPI works; but tarball URL is still broken

    PyPI works; but tarball URL is still broken

    It seems like you haven't created the new release on github yet. The new update URL goes to Not Found again, although the download table has the correct URL.

    https://github.com/OpenCageData/python-opencage-geocoder/tarball/1.1.3

    Don't forget, the installation works, it's just that the "Download URL" doesn't work.

    opened by CrazyPython 1
  • Error

    Error

    I am getting s error

    /storage/emulated/0 $ pip install opencage Collecting opencage Using cached opencage-2.1.0-py3-none-any.whl (13 kB) Collecting Requests>=2.2.0 Using cached requests-2.28.1-py3-none-any.whl (62 kB) Collecting backoff>=1.10.0 Using cached backoff-2.2.1-py3-none-any.whl (15 kB) Collecting pyopenssl>=0.15.1 Using cached pyOpenSSL-22.1.0-py3-none-any.whl (57 kB) Collecting cryptography<39,>=38.0.0 Using cached cryptography-38.0.3.tar.gz (599 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing wheel metadata ... done Requirement already satisfied: cffi>=1.12 in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages (from cryptography<39,>=38.0.0->pyopenssl>=0.15.1->opencage) (1.15.1) Requirement already satisfied: pycparser in /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages (from cffi>=1.12->cryptography<39,>=38.0.0->pyopenssl>=0.15.1->opencage) (2.21) Collecting idna<4,>=2.5 Using cached idna-3.4-py3-none-any.whl (61 kB) Collecting certifi>=2017.4.17 Using cached certifi-2022.9.24-py3-none-any.whl (161 kB) Collecting urllib3<1.27,>=1.21.1 Using cached urllib3-1.26.13-py2.py3-none-any.whl (140 kB)Collecting charset-normalizer<3,>=2 Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB) Building wheels for collected packages: cryptography Building wheel for cryptography (PEP 517) ... error ERROR: Command errored out with exit status 1: command: /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/bin/python3.9 /data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/pip/_vendor/pep517/in_process/_in_process.py build_wheel /data/user/0/ru.iiec.pydroid3/cache/tmp59b1_q1e cwd: /data/user/0/ru.iiec.pydroid3/cache/pip-install-q0mptkzv/cryptography_1d42d125971b4eb489334a210c21048a Complete output (193 lines): running bdist_wheel running build running build_py creating build creating build/lib.linux-aarch64-cpython-39 creating build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/about.py -> build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/init.py -> build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/exceptions.py -> build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/fernet.py -> build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/utils.py -> build/lib.linux-aarch64-cpython-39/cryptography creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat copying src/cryptography/hazmat/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat copying src/cryptography/hazmat/_oid.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat creating build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/base.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/certificate_transparency.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/extensions.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/general_name.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/name.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/ocsp.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 copying src/cryptography/x509/oid.py -> build/lib.linux-aarch64-cpython-39/cryptography/x509 creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends copying src/cryptography/hazmat/backends/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings copying src/cryptography/hazmat/bindings/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/_asymmetric.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/_cipheralgorithm.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/_serialization.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/cmac.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/constant_time.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/hashes.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/hmac.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/keywrap.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/padding.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives copying src/cryptography/hazmat/primitives/poly1305.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/aead.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/backend.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/ciphers.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/cmac.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/decode_asn1.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/dh.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/dsa.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/ec.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/ed25519.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/ed448.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/hashes.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/hmac.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/poly1305.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/rsa.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/utils.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/x25519.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/x448.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl copying src/cryptography/hazmat/backends/openssl/x509.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/backends/openssl creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/openssl copying src/cryptography/hazmat/bindings/openssl/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/openssl copying src/cryptography/hazmat/bindings/openssl/_conditional.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/openssl copying src/cryptography/hazmat/bindings/openssl/binding.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/openssl creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/dh.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/dsa.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/ec.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/ed25519.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/ed448.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/padding.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/rsa.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/types.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/utils.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/x25519.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric copying src/cryptography/hazmat/primitives/asymmetric/x448.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/asymmetric creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers copying src/cryptography/hazmat/primitives/ciphers/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers copying src/cryptography/hazmat/primitives/ciphers/aead.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers copying src/cryptography/hazmat/primitives/ciphers/algorithms.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers copying src/cryptography/hazmat/primitives/ciphers/base.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers copying src/cryptography/hazmat/primitives/ciphers/modes.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/ciphers creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/concatkdf.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/hkdf.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/kbkdf.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/pbkdf2.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/scrypt.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf copying src/cryptography/hazmat/primitives/kdf/x963kdf.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/kdf creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization copying src/cryptography/hazmat/primitives/serialization/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization copying src/cryptography/hazmat/primitives/serialization/base.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization copying src/cryptography/hazmat/primitives/serialization/pkcs12.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization copying src/cryptography/hazmat/primitives/serialization/pkcs7.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization copying src/cryptography/hazmat/primitives/serialization/ssh.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/serialization creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/twofactor copying src/cryptography/hazmat/primitives/twofactor/init.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/twofactor copying src/cryptography/hazmat/primitives/twofactor/hotp.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/twofactor copying src/cryptography/hazmat/primitives/twofactor/totp.py -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/primitives/twofactor running egg_info writing src/cryptography.egg-info/PKG-INFO writing dependency_links to src/cryptography.egg-info/dependency_links.txt writing requirements to src/cryptography.egg-info/requires.txt writing top-level names to src/cryptography.egg-info/top_level.txt reading manifest file 'src/cryptography.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' no previously-included directories found matching 'docs/_build' warning: no previously-included files found matching 'vectors' warning: no previously-included files matching '' found under directory 'vectors' warning: no previously-included files matching '' found under directory '.github' warning: no previously-included files found matching 'release.py' warning: no previously-included files found matching '.readthedocs.yml' warning: no previously-included files found matching 'dev-requirements.txt' warning: no previously-included files found matching 'tox.ini' warning: no previously-included files found matching 'mypy.ini' warning: no previously-included files matching '*' found under directory '.circleci' adding license file 'LICENSE' adding license file 'LICENSE.APACHE' adding license file 'LICENSE.BSD' adding license file 'LICENSE.PSF' writing manifest file 'src/cryptography.egg-info/SOURCES.txt' /data/user/0/ru.iiec.pydroid3/cache/pip-build-env-sue3vksc/overlay/lib/python3.9/site-packages/setuptools/command/build_py.py:202: SetuptoolsDeprecationWarning: Installing 'cryptography.hazmat.bindings._rust' as data is deprecated, please list it in packages. !!

      ############################
      # Package would be ignored #
      ############################
      Python recognizes 'cryptography.hazmat.bindings._rust' as an importable package,
      but it is not listed in the `packages` configuration of setuptools.
    
      'cryptography.hazmat.bindings._rust' has been automatically added to the distribution only
      because it may contain data files, but this behavior is likely to change
      in future versions of setuptools (and therefore is considered deprecated).
    
      Please make sure that 'cryptography.hazmat.bindings._rust' is included as a package by using
      the `packages` configuration field or the proper discovery methods
      (for example by using `find_namespace_packages(...)`/`find_namespace:`
      instead of `find_packages(...)`/`find:`).
    
      You can read more about "package discovery" and "data files" on setuptools
      documentation page.
    

    !!

    check.warn(importable)
    

    copying src/cryptography/py.typed -> build/lib.linux-aarch64-cpython-39/cryptography copying src/cryptography/hazmat/bindings/_openssl.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings creating build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust copying src/cryptography/hazmat/bindings/_rust/init.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust copying src/cryptography/hazmat/bindings/_rust/asn1.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust copying src/cryptography/hazmat/bindings/_rust/ocsp.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust copying src/cryptography/hazmat/bindings/_rust/x509.pyi -> build/lib.linux-aarch64-cpython-39/cryptography/hazmat/bindings/_rust running build_ext generating cffi module 'build/temp.linux-aarch64-cpython-39/cryptography.hazmat.bindings._openssl.c' creating build/temp.linux-aarch64-cpython-39 running build_rust

      =============================DEBUG ASSISTANCE=============================
      If you are seeing a compilation error please try the following steps to
      successfully install cryptography:
      1) Upgrade to the latest pip and try again. This will fix errors for most
         users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
      2) Read https://cryptography.io/en/latest/installation/ for specific
         instructions for your platform.
      3) Check our frequently asked questions for more information:
         https://cryptography.io/en/latest/faq/
      4) Ensure you have a recent Rust toolchain installed:
         https://cryptography.io/en/latest/installation/#rust
    
      Python: 3.9.7
      platform: Linux-5.4.147-24896147-abG998BXXS5CVIF-aarch64-with-libc
      pip: n/a
      setuptools: 65.6.3
      setuptools_rust: 1.5.2
      rustc: n/a
      =============================DEBUG ASSISTANCE=============================
    

    error: can't find Rust compiler

    If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.

    To update pip, run:

      pip install --upgrade pip
    

    and then retry package installation.

    If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.

    This package requires Rust >=1.48.0.

    ERROR: Failed building wheel for cryptography Failed to build cryptography ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly WARNING: You are using pip version 21.2.4; however, version 22.3.1 is available. You should consider upgrading via the '/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/bin/python3.9 -m pip install --upgrade pip' command. /storage/emulated/0 $

    opened by ZribeDev 1
  • enable travis testing against pypy again

    enable travis testing against pypy again

    With https://github.com/OpenCageData/python-opencage-geocoder/pull/21 we weren't able to get pypy running the tests properly. Could be a combination of operating system (Travis-CI environment) and openssl.

    opened by mtmail 0
Owner
OpenCage GmbH
easy, open, affordable, worldwide geocoding API
OpenCage GmbH
A library to access OpenStreetMap related services

OSMPythonTools The python package OSMPythonTools provides easy access to OpenStreetMap (OSM) related services, among them an Overpass endpoint, Nomina

Franz-Benjamin Mocnik 342 Dec 31, 2022
Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API

Zora Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API Installing a

z3r0day 1 Oct 26, 2021
Python module and script to interact with the Tractive GPS tracker.

pyTractive GPS Python module and script to interact with the Tractive GPS tracker. Requirements Python 3 geopy folium pandas pillow usage: main.py [-h

Dr. Usman Kayani 3 Nov 16, 2022
GeoIP Legacy Python API

MaxMind GeoIP Legacy Python Extension API Requirements Python 2.5+ or 3.3+ GeoIP Legacy C Library 1.4.7 or greater Installation With pip: $ pip instal

MaxMind 230 Nov 10, 2022
Documentation and samples for ArcGIS API for Python

ArcGIS API for Python ArcGIS API for Python is a Python library for working with maps and geospatial data, powered by web GIS. It provides simple and

Esri 1.4k Dec 30, 2022
A simple python script that, given a location and a date, uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed on the command-line.

What does it do? Given a location and a date, it uses the Nasa Earth API to show a photo taken by the Landsat 8 satellite. The script must be executed

Caio 42 Nov 26, 2022
An API built to format given addresses using Python and Flask.

An API built to format given addresses using Python and Flask. About The API returns properly formatted data, i.e. removing duplicate fields, distingu

null 1 Feb 27, 2022
Program that shows all the details of the given IP address. Build with Python and ipinfo.io API

ip-details This is a program that shows all the details of the given IP address. Build with Python and ipinfo.io API Usage To use this program, run th

null 4 Mar 1, 2022
Tile Map Service and OGC Tiles API for QGIS Server

Tiles API Add tiles API to QGIS Server Tiles Map Service API OGC Tiles API Tile Map Service API - TMS The TMS API provides these URLs: /tms/? to get i

3Liz 6 Dec 1, 2021
Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

mmdb-server mmdb-server is an open source fast API server to lookup IP addresses

Alexandre Dulaunoy 67 Nov 25, 2022
This is a simple python code to get IP address and its location using python

IP address & Location finder @DEV/ED : Pavan Ananth Sharma Dependencies: ip2geotools Note: use pip install ip2geotools to install this in your termin

Pavan Ananth Sharma 2 Jul 5, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 765 Jan 6, 2023
Python Data. Leaflet.js Maps.

folium Python Data, Leaflet.js Maps folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js

null 6k Jan 2, 2023
Python tools for geographic data

GeoPandas Python tools for geographic data Introduction GeoPandas is a project to add support for geographic data to pandas objects. It currently impl

GeoPandas 3.5k Jan 3, 2023
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

null 832 Dec 31, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 763 Dec 26, 2022
PySAL: Python Spatial Analysis Library Meta-Package

Python Spatial Analysis Library PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with

Python Spatial Analysis Library 1.1k Dec 18, 2022
Simple, concise geographical visualization in Python

Geographic visualizations for HoloViews. Build Status Coverage Latest dev release Latest release Docs What is it? GeoViews is a Python library that ma

HoloViz 445 Jan 2, 2023
A package built to support working with spatial data using open source python

EarthPy EarthPy makes it easier to plot and manipulate spatial data in Python. Why EarthPy? Python is a generic programming language designed to suppo

Earth Lab 414 Dec 23, 2022