Skip to main content

yelpapi is a pure Python implementation of the Yelp Fusion API.

Project description

yelpapi

Tests

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

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

yelpapi-2.6.0.tar.gz (12.9 kB view details)

Uploaded Source

Built Distribution

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

yelpapi-2.6.0-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

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

Hashes for yelpapi-2.6.0.tar.gz
Algorithm Hash digest
SHA256 739c0a99f4a528cca167fc27c19d448cdcf9ec4b24bf2bb39aa7e2e48b3897cb
MD5 18b361b60fa2623831a87c57eca25317
BLAKE2b-256 752e99c487e35a17b5481a7dffdf95eb9d7ede2945f4a8af5bf1f05f90e57cc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for yelpapi-2.6.0.tar.gz:

Publisher: publish.yml on lanl/yelpapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for yelpapi-2.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0d6b16756152f679675f9c88421895954bcfc3a3a9318635b8bef0cd5d5417c
MD5 385b428843ed8b01a975a71db00aef96
BLAKE2b-256 46540711f766c17818c34c53a60fa6b0f646d903335e218e8077ee8e8cc3c46a

See more details on using hashes here.

Provenance

The following attestation bundles were made for yelpapi-2.6.0-py3-none-any.whl:

Publisher: publish.yml on lanl/yelpapi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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