yelpapi is a pure Python implementation of the Yelp Fusion API.
Project description
yelpapi
LICENSE
This software is licensed under the BSD 3-Clause License. Please refer to the separate LICENSE file for the exact text of the license. You are obligated to give attribution if you use this code.
ABOUT
yelpapi is a pure Python implementation of the Yelp Fusion API. It is simple, fast, and robust to any changes Yelp may make to the API in the future.
REQUIREMENTS
This code requires Python 3.9 or higher and requests.
INSTALL
yelpapi is available on PyPI at https://pypi.org/project/yelpapi/.
Install using pip:
pip install yelpapi
USING THIS CODE
This API is demonstrated more thoroughly in examples.py, but the following chunk of code demonstrates basic use of yelpapi:
from yelpapi import YelpAPI
with YelpAPI(api_key) as yelp_api:
search_results = yelp_api.search_query(args)
You can also set timeouts so API calls do not block indefinitely in degraded network conditions:
from yelpapi import YelpAPI
with YelpAPI(api_key, timeout_s=3.0) as yelp_api:
search_results = yelp_api.search_query(args)
Under the covers, this module uses a requests.Session object for issuing all API calls, which offers potentially significant performance benefits over issuing separate API calls outside of a session. You should be sure to close the underlying session when all API interactions are complete. The above examples demonstrate using the class as a context manager, which will automatically close the connection when you're done and is the preferred way of using the class, but you can also manually close it like this if a context manager won't work for your use case:
from yelpapi import YelpAPI
try:
yelp_api = YelpAPI(api_key)
search_results = yelp_api.search_query(args)
finally:
yelp_api.close()
METHODS
- Autocomplete API -
autocomplete_query(...) - Business API -
business_query(...) - Business Engagement Metrics API -
business_engagement_query(...) - Business Match API -
business_match_query(...) - Business Service Offerings API -
business_service_offerings_query(...) - Categories API -
categories_query(...) - Category API -
category_query(...) - Event Lookup API -
event_lookup_query(...) - Event Search API -
event_search_query(...) - Featured Event API -
featured_event_query(...) - Phone Search API -
phone_search_query(...) - Review Highlights API -
review_highlights_query(...) - Reviews API -
reviews_query(...) - Search API -
search_query(...) - Transaction Search API -
transaction_search_query(...)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file yelpapi-2.6.0.tar.gz.
File metadata
- Download URL: yelpapi-2.6.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
739c0a99f4a528cca167fc27c19d448cdcf9ec4b24bf2bb39aa7e2e48b3897cb
|
|
| MD5 |
18b361b60fa2623831a87c57eca25317
|
|
| BLAKE2b-256 |
752e99c487e35a17b5481a7dffdf95eb9d7ede2945f4a8af5bf1f05f90e57cc0
|
Provenance
The following attestation bundles were made for yelpapi-2.6.0.tar.gz:
Publisher:
publish.yml on lanl/yelpapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yelpapi-2.6.0.tar.gz -
Subject digest:
739c0a99f4a528cca167fc27c19d448cdcf9ec4b24bf2bb39aa7e2e48b3897cb - Sigstore transparency entry: 1120870760
- Sigstore integration time:
-
Permalink:
lanl/yelpapi@749eeec835cd52a18d4153d7c94adef2799ec107 -
Branch / Tag:
refs/tags/v2.6.0 - Owner: https://github.com/lanl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@749eeec835cd52a18d4153d7c94adef2799ec107 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yelpapi-2.6.0-py3-none-any.whl.
File metadata
- Download URL: yelpapi-2.6.0-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0d6b16756152f679675f9c88421895954bcfc3a3a9318635b8bef0cd5d5417c
|
|
| MD5 |
385b428843ed8b01a975a71db00aef96
|
|
| BLAKE2b-256 |
46540711f766c17818c34c53a60fa6b0f646d903335e218e8077ee8e8cc3c46a
|
Provenance
The following attestation bundles were made for yelpapi-2.6.0-py3-none-any.whl:
Publisher:
publish.yml on lanl/yelpapi
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yelpapi-2.6.0-py3-none-any.whl -
Subject digest:
f0d6b16756152f679675f9c88421895954bcfc3a3a9318635b8bef0cd5d5417c - Sigstore transparency entry: 1120870830
- Sigstore integration time:
-
Permalink:
lanl/yelpapi@749eeec835cd52a18d4153d7c94adef2799ec107 -
Branch / Tag:
refs/tags/v2.6.0 - Owner: https://github.com/lanl
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@749eeec835cd52a18d4153d7c94adef2799ec107 -
Trigger Event:
push
-
Statement type: