skillfed

geopy

Python Geocoding Toolbox

geopy v2.5.0 19.0M downloads/30d#1,075 on PyPI4,840
Permissive license MIT Active released

What it is and what it does

geopy is a mature geocoding and distance-calculation library that abstracts away the complexity of calling multiple web-based geocoding services. It lets you convert an address string into latitude/longitude coordinates, reverse that process to find an address from coordinates, and compute distances between geographic points using geodesic or great-circle methods. The library wraps services like OpenStreetMap Nominatim and Google Geocoding API, so you can switch providers without rewriting your code.

The package is designed for developers who need to work with geographic data in Python—whether building location-aware applications, analyzing spatial datasets, or integrating map-based features. It handles the HTTP calls, response parsing, and coordinate math internally, leaving you to focus on your application logic. The single runtime dependency (geographiclib) keeps the install footprint small.

Use it for:

  • Convert user-entered addresses into map coordinates for location-based search or mapping applications.
  • Reverse-geocode GPS coordinates to display human-readable addresses in mobile or field-service apps.
  • Calculate driving or straight-line distances between two locations for routing, delivery, or proximity analysis.
  • Batch geocode a list of addresses to prepare geographic datasets for analysis or visualization.
  • Switch between multiple geocoding providers (Nominatim, Google, etc.) without changing application code.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

geopy is a Python client for geocoding and distance calculation that converts addresses to coordinates and vice versa using multiple web-based geocoding services, and computes geodesic and great-circle distances between geographic points.

Yes. geopy is a stable, actively maintained library with no known vulnerabilities, low install friction, and permissive licensing. It solves a common problem (address-to-coordinate conversion and distance calculation) with a clean API and support for multiple providers. Install it if you need geocoding or distance calculations in your application.

Install

geopy on PyPI

pip

pip install geopy

uv

uv add geopy

poetry

poetry add geopy

Installing geopy

Before you install

Low install friction with a single runtime dependency (geographiclib). The package is actively maintained with a recent release, has been in production use since 2006, and supports current Python versions (3.8 to 3.15).

License in practice

MIT license is permissive and places no restrictions on commercial or private use, modification, or distribution—only requires preservation of copyright and license notices.

Quickstart

pip install geopy

from geopy.geocoders import Nominatim
geolocator = Nominatim(user_agent="my_app")
location = geolocator.geocode("175 5th Avenue NYC")
print(location.latitude, location.longitude)

Requires a user_agent parameter for Nominatim; third-party geocoding services may have rate limits or require API keys.

Verify before relying

  • Whether all supported geocoding services are documented with their individual rate limits and authentication requirements.
  • Whether geographiclib is bundled or must be installed separately for distance calculations to work.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 1 — geographiclib
Maintenance actively maintained — 33 days since the last release
Last repo commit
First released
Downloads 19,001,861/month — #1,075 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: geopy-2.5.0-py3-none-any.whl

Keywords: geocode, geocoding, gis, geographical, maps, earth, distance

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Scientific/Engineering :: GISTopic :: Software Development :: Libraries :: Python Modules

Tags

geocoding address to coordinatesreverse geocoding coordinates to addressdistance between two locationsnominatim google maps geocodergeographic coordinate lookupgeodesic distance calculationaddress geolocation python
geocodinggisdistance-calculation

More Python Modules packages