Skip to main content

No project description provided

Project description

yelpfusion3 is a Python 3 client library for Yelp Fusion API v3. The API provides Python developers with a type-safe interface, so they do not need to process raw JSON responses.

Installation

python -m pip install --upgrade pip
python -m pip install --upgrade yelpfusion3

Yelp API Key

Sign up for a Yelp Developers account. Yelp’s Authentication documentation describes how to create a new private API key.

Basic Usage

Set the YELP_API_KEY environment variable to be your private API key. Setting the YELP_API_KEY environment variable is currently the only supported method for supplying your API key to the yelpfusion3 client.

>>> from yelpfusion3.client import Client
>>> from yelpfusion3.business.endpoint import BusinessDetailsEndpoint
>>> from yelpfusion3.business.model import BusinessDetails
>>> business_details_endpoint: BusinessDetailsEndpoint = Client.business_details(business_id="WavvLdfdP6g8aZTtbBQHTw")
>>> business_details_endpoint
BusinessDetailsEndpoint(business_id='WavvLdfdP6g8aZTtbBQHTw', locale=None)
>>> business_details: BusinessDetails = business_details_endpoint.get()
>>> business_details
BusinessDetails(id='WavvLdfdP6g8aZTtbBQHTw', alias='gary-danko-san-francisco', name='Gary Danko', image_url=HttpUrl('https://s3-media3.fl.yelpcdn.com/bphoto/eyYUz3Xl7NtcJeN7x7SQwg/o.jpg', ), is_claimed=True, is_closed=False, url=HttpUrl('https://www.yelp.com/biz/gary-danko-san-francisco?adjust_creative=iLXKG_naOtwkmDCMRoHImA&utm_campaign=yelp_api_v3&utm_medium=api_v3_business_lookup&utm_source=iLXKG_naOtwkmDCMRoHImA', ), phone='+14157492060', display_phone='(415) 749-2060', review_count=5748, categories=[Category(alias='newamerican', title='American (New)'), Category(alias='french', title='French'), Category(alias='wine_bars', title='Wine Bars')], rating=4.5, location=Location(address1='800 N Point St', address2='', address3='', city='San Francisco', state='CA', zip_code='94109', country='US', display_address=['800 N Point St', 'San Francisco, CA 94109'], cross_streets=''), coordinates=Coordinates(latitude=37.80587, longitude=-122.42058), photos=[HttpUrl('https://s3-media3.fl.yelpcdn.com/bphoto/eyYUz3Xl7NtcJeN7x7SQwg/o.jpg', ), HttpUrl('https://s3-media4.fl.yelpcdn.com/bphoto/1qgI44xDsgZyXxtcFgMeRQ/o.jpg', ), HttpUrl('https://s3-media3.fl.yelpcdn.com/bphoto/wVGFtORjtBK8-7G-T-PmGg/o.jpg', )], price='$$$$', hours=[Hours(open=[DetailedHours(is_overnight=False, start='1700', end='2200', day=0), DetailedHours(is_overnight=False, start='1700', end='2200', day=3), DetailedHours(is_overnight=False, start='1700', end='2200', day=4), DetailedHours(is_overnight=False, start='1700', end='2200', day=5), DetailedHours(is_overnight=False, start='1700', end='2200', day=6)], hours_type='REGULAR', is_open_now=False)], transactions=[], special_hours=None)

License

yelpfusion3 is released under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yelpfusion3-1.0.4.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yelpfusion3-1.0.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file yelpfusion3-1.0.4.tar.gz.

File metadata

  • Download URL: yelpfusion3-1.0.4.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for yelpfusion3-1.0.4.tar.gz
Algorithm Hash digest
SHA256 597d67b46157fa2b2d11201cb2ca21105bfb70c44095c31664dfe2231645b1d5
MD5 ad741966b0b162c084f33ba9ae7b9ab2
BLAKE2b-256 0b17d0fc7e99c230ccff0c6d53c6db3131ca53a462625152877e41a89e3dfec4

See more details on using hashes here.

File details

Details for the file yelpfusion3-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: yelpfusion3-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.1

File hashes

Hashes for yelpfusion3-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 12c34f83c2ef9d08e1ecbc0e2a8fca3218ac03d6e620739ece9a771894ab32f1
MD5 475ad707d9803e2dcb56f5d3cf17e1cc
BLAKE2b-256 0cb127c7055e9ae0d9be4b5a0f19bdbad9eef27a3444480ef45a0cd8a43ce8e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page