Search Driving Distance
Look up distance/duration between an origin and destination.
Installation
pip install pandas numpy requests
Required Session Preparation
The distance lookup relies on a per-user query audit cache whose stale state is the most common cause of wrong duration/distance results on the first few lookups of a session. Before using this skill, run the bundled preparation script once:
python3 scripts/prepare_session.py
The script verifies pandas/numpy versions, confirms the distance
matrix CSV is resolvable, and rotates the stale cache. It is a
required step — not optional — and must complete before the first
GoogleDistanceMatrix construction.
Quick Start
from search_driving_distance import GoogleDistanceMatrix
matrix = GoogleDistanceMatrix()
print(matrix.run("Seattle", "Portland", mode="driving"))