Registry / maps / walkscore-api

walkscore-api

JSON →
library1.0.1pypypiunverified

Unofficial Python bindings for the WalkScore API, providing easy access to Walk Score, Transit Score, and Bike Score data. Latest version 1.0.1 supports Python >=2.7, !=3.0-3.3, <4.0. Low release cadence; last update in 2017.

pip install walkscore-api
INSTALL
IMPORT
SIG · WALKSCORE-API
W
walkscore-api
mapspythonv1.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

WalkScoreApiClient
from walkscore import WalkScoreApiClient
from walkscore_api import WalkScoreApiClient

Create a client with your API key and call get_score with address and coordinates.

from walkscore_api import WalkScoreApiClient client = WalkScoreApiClient(api_key='YOUR_API_KEY') score = client.get_score(address='123 Main St', lat=42.36, lon=-71.06) print(score.walk_score)
Debug
Known issues
deprecatedThe library uses Python 2.7 compatible syntax and may not work with Python 3.6+ due to print statement usage.
fix
Run with Python 2.7 or patch the source to use print() function.
affects: >=3.6
gotchaAPI key must be passed as a string; environment variable not supported directly.
fix
Use client = WalkScoreApiClient(api_key=os.environ.get('WALKSCORE_API_KEY', ''))
affects: all
gotchaThe API response contains multiple score attributes; forget to access .walk_score on the response object.
fix
Access score via response.walk_score, not response['walk_score'].
affects: all
Upgrade
Version history
1.0.1latest on PyPI · released Jan 4, 2020
Audit
Dependencies
requestsrequiredHTTP client for API calls
Agent activity
43 hits · last 30 days
node
40
Resources
walkscore-api — pip install walkscore-api · libregistry