Python Wrapper over Best Buy's REST API
Project description
Python Best Buy API Wrapper
This is a small python wrapper implementation for BestBuy API.
Features
- Query Bulk BestBuy API
- Query Stores BestBuy API
- Query Products BestBuy API
- Query Categories BestBuy API
- Obtain queries result in JSON or XML
- Environment variable support via
python-dotenv - Modern development workflow with
uvandpre-commit
Install
We recommend using uv for package management:
uv add bestbuyapi
Or with pip:
pip install bestbuyapi
Configuration
You can use a .env file to store your API key:
BESTBUY_API_KEY=your_api_key_here
Usage
from bestbuyapi import BestBuyAPI
# If not provided, it will look for BESTBUY_API_KEY in environment variables
bb = BestBuyAPI()
a_prod = bb.products.search(query="sku=9776457", format="json")
a_cat = bb.category.search_by_id(category_id="abcat0011001", format="json")
all_categories = bb.bulk.archive("categories", "json")
Development
Running Tests
Tests are executed via pytest. We use pytest-cov for coverage reporting.
uv run pytest --cov=bestbuyapi
CI/CD and Coverage
Our CI pipeline in GitHub Actions runs tests across multiple Python versions. Coverage reports are generated during the test phase and can be shared or uploaded to services like Codecov.
Pre-commit Hooks
We use pre-commit to ensure code quality. It runs ruff for linting and formatting.
uv run pre-commit run --all-files
FAQ
- Is there any difference between /api.bestbuy.com/ and api.remix.bestbuy.com? A: There is no difference, they serve the same data - we just consolidated domains. The official url to use is api.bestbuy.com.
Any questions please feel free to email me at: luis@lv10.me
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
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 bestbuyapi-2.1.3.tar.gz.
File metadata
- Download URL: bestbuyapi-2.1.3.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
985d83a9b74ad6a9c35128fbbeb626c1e7ae77857f19e1830f957823e1506013
|
|
| MD5 |
013e7772a15c8b6eab9f877ae3f608da
|
|
| BLAKE2b-256 |
ed32c214daeeb94953791a7d3bf0d991a9f85306380bd41c52aa247e484b2ffb
|
File details
Details for the file bestbuyapi-2.1.3-py3-none-any.whl.
File metadata
- Download URL: bestbuyapi-2.1.3-py3-none-any.whl
- Upload date:
- Size: 9.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f092cf34f1f68f2fa05554e96409f249347d3a2ae9b75f22822cfec3c6a2990
|
|
| MD5 |
c184a567dd8a017deb477a3e94744d4a
|
|
| BLAKE2b-256 |
d0b171b867725632c14b96ac43229a3ac8b08fe06f3fa3f0f235b75570ffaaf2
|