Skip to content

mathisonian/python-yelp-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

python-yelp-v2

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.

Installation

From pypi

pip install python-yelp-v2

Usage

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)

Searching

search_results = yelp_api.Search(term="my search term") for business in search_results.businesses: print business.name

See the exact attributes available on the search result set

Getting business info

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.

Todo

  • Create classes for categories.
  • Improve the location class

Notes

This software was developed during my time at Pontiflex, Inc., and thus that organization owns the copyright.

Authors

License

Copyright 2012, 2013 Pontiflex, Inc.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the LICENSE file, or at:

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

A Python wrapper for the Yelp API v2

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages