keepa_crawler
A Python client for interacting with Keepa's WebSocket API to retrieve historical Amazon product data.
Installation
Install from PyPI:
pip install keepa_crawler
Usage
from keepa_crawler import KeepaClient
# Initialize the client
client = KeepaClient()
# Example 1: Retrieve historical prices for a specific ASIN
try:
data = client.get_historical_prices(asin="B08N5WRWNW")
print("Historical Prices:", data)
except Exception as e:
print(f"Error retrieving data: {e}")
# Example 2: Handling multiple ASINs
asins = ["B08N5WRWNW", "B07XJ8C8F5", "B09FGT1JQC"]
for asin in asins:
try:
data = client.get_historical_prices(asin=asin)
print(f"Data for {asin}: {data}")
except Exception as e:
print(f"Error retrieving data for {asin}: {e}")
# Example 3: Handling a timeout error
try:
data = client.get_historical_prices(asin="B08N5WRWNW", timeout=5)
print("Historical Prices:", data)
except Exception as e:
print(f"Timeout or other error occurred: {e}")
# Clean up the client
client.close()
Requirements
- Python 3.8 or newer
- Dependencies are installed automatically via
pip
License
This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for keepa-crawler 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| keepa_crawler-1.0.0.tar.gz | 5.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| keepa_crawler-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.1 kB
Release files / keepa_crawler-1.0.0.tar.gz
| Download URL | keepa_crawler-1.0.0.tar.gz |
|---|---|
| Size | 5.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
01af04c527687f4cf15151fa817a1f5ea7c588624f9969ddec511202b7cd5b6a
|
|
BLAKE2b-256 checksum How to use checksums |
d3b30a0e621b65f7167aa640875c567994ed844d2c61dbe75445eb141ccfce1f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / keepa_crawler-1.0.0-py3-none-any.whl
| Download URL | keepa_crawler-1.0.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2819a937d8161266483b2ba70d34ff48a2ed39d21629f0c3fbc5b4b9d53fbdf7
|
|
BLAKE2b-256 checksum How to use checksums |
68fe52ba984f89bcc492d54b5afbfcf46218eb7bf31d19e83c236a69f9f0de9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|