A Python wrapper for the Yelp API v2. The structure for this was inspired by the python-twitter library, and some internal methods are reused.
From pypi
pip install python-yelp-v2
You must have yelp oauth credentials: http://www.yelp.com/developers/getting_started
import yelp
yelp_api = yelp.Api(consumer_key=MY_CONSUMER_KEY,
consumer_secret=MY_CONSUMER_SECRET,
access_token_key=MY_ACCESS_TOKEN,
access_token_secret=MY_ACCESS_SECRET)
search_results = yelp_api.Search(term="my search term", location="my location") # location and search term are required
for business in search_results.businesses:
print business.name
See the exact attributes available on the search result set
business = yelp_api.GetBusiness('post-no-bills-brooklyn')
print business.name
The business class lists all of the attributes that are available for each business the API returns.
- Create classes for categories.
- Improve the location class
- Matthew Conlen (mathisonian)
- Chris Clouten (triplec1988)
Copyright Matthew Conlen
MIT