Python client for Kaspi.kz offers API
Project description
Kaspi Offers API
Python client for Kaspi.kz offers API
Installation
pip install kaspi-offers-py
Usage
import asyncio
from kaspi_offers_py import KaspiClient
async def main():
client = KaspiClient()
# Get offers for a product
response = await client.get_offers("123728177")
print(f"Found {response.total} offers")
# Iterate through offers
for offer in response.offers:
print(f"{offer.merchantName}: {offer.price} ₸")
print(f"Rating: {offer.merchantRating} ({offer.merchantReviewsQuantity} reviews)")
print(f"Delivery: {offer.deliveryType}")
print("---")
asyncio.run(main())
Parameters
response = await client.get_offers(
product_id="123728177",
city_id="750000000", # Almaty by default
limit=64,
page=0
)
Data Models
Offer
merchantName- merchant nameprice- pricemerchantRating- merchant ratingmerchantReviewsQuantity- number of reviewsdeliveryType- delivery type (EXPRESS, TO_DOOR, PICKUP, POSTOMAT)kaspiDelivery- Kaspi delivery availabledelivery- delivery datepickup- pickup date
OffersResponse
offers- list of offerstotal- total countoffersCount- count in response
Requirements
- Python >= 3.9
- httpx >= 0.27.0
Development
Install development dependencies
Using uv (recommended):
# Automatically installs dev dependencies
uv sync
Using pip:
pip install -e ".[dev]"
Running tests
Using uv:
# Unit tests only (default - fast, no network)
uv run pytest
# Integration tests (real API calls, requires network)
uv run pytest -m integration
# All tests (unit + integration)
uv run pytest -m ""
# With coverage
uv run pytest --cov=kaspi_offers_py --cov-report=html
Using pip/pytest directly:
# Unit tests only (default - fast, no network)
pytest
# Integration tests (real API calls, requires network)
pytest -m integration
# All tests (unit + integration)
pytest -m ""
# With coverage
pytest --cov=kaspi_offers_py --cov-report=html
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 kaspi_offers_py-0.1.6.tar.gz.
File metadata
- Download URL: kaspi_offers_py-0.1.6.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a6e74ce03584a8d637bd6710793e05804bd3c5d1fc597370b0e8e645c5e6524
|
|
| MD5 |
acb0eaac70372a2fcb21a886eca728fe
|
|
| BLAKE2b-256 |
c0a82c680cb72297151d4fcf4980dd6b0c8bf7bf98daa55ee003b3ab6b750391
|
Provenance
The following attestation bundles were made for kaspi_offers_py-0.1.6.tar.gz:
Publisher:
publish.yml on nurzhanme/kaspi-offers-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaspi_offers_py-0.1.6.tar.gz -
Subject digest:
2a6e74ce03584a8d637bd6710793e05804bd3c5d1fc597370b0e8e645c5e6524 - Sigstore transparency entry: 759930603
- Sigstore integration time:
-
Permalink:
nurzhanme/kaspi-offers-py@fb0a8c22a258257a18876c43289346aa551262a4 -
Branch / Tag:
refs/tags/0.1.6 - Owner: https://github.com/nurzhanme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb0a8c22a258257a18876c43289346aa551262a4 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kaspi_offers_py-0.1.6-py3-none-any.whl.
File metadata
- Download URL: kaspi_offers_py-0.1.6-py3-none-any.whl
- Upload date:
- Size: 3.6 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 |
0fa4d6be69df25bb49e1bf05a821e79e8550b44b7688611658792f779b6bca15
|
|
| MD5 |
586465ed122a0d7e98cc1feacd8b5c6c
|
|
| BLAKE2b-256 |
6a11dc38fa9d642445a2f89b7539481f2edb38cefb0c2d3153f35c67625da9fd
|
Provenance
The following attestation bundles were made for kaspi_offers_py-0.1.6-py3-none-any.whl:
Publisher:
publish.yml on nurzhanme/kaspi-offers-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaspi_offers_py-0.1.6-py3-none-any.whl -
Subject digest:
0fa4d6be69df25bb49e1bf05a821e79e8550b44b7688611658792f779b6bca15 - Sigstore transparency entry: 759930604
- Sigstore integration time:
-
Permalink:
nurzhanme/kaspi-offers-py@fb0a8c22a258257a18876c43289346aa551262a4 -
Branch / Tag:
refs/tags/0.1.6 - Owner: https://github.com/nurzhanme
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@fb0a8c22a258257a18876c43289346aa551262a4 -
Trigger Event:
release
-
Statement type: