Python wrapper for the Kaufland Marketplace Seller API
Project description
python-kaufland-api
Python wrapper for the Kaufland Marketplace Seller API. There are clients for both sync and async usage, all available endpoints are included.
This is the first commit, documentation will follow. Please refer to this README for usage for now, or create an issue.
Install
pip install python-kaufland-api
For development:
pip install -e '.[dev]'
Authentication
Set credentials via environment variables or pass them into the client constructor:
KAUFLAND_CLIENT_KEYKAUFLAND_SECRET_KEYKAUFLAND_USER_AGENTKAUFLAND_STOREFRONT(optional default)KAUFLAND_PARTNER_CLIENT_KEY(optional)KAUFLAND_PARTNER_SECRET_KEY(optional)KAUFLAND_SIGNATURE_ENCODING(hexdefault,base64optional)
Sync Usage
from kaufland import Client
from kaufland.api.products import Products
client = Client(
client_key="...",
secret_key="...",
storefront="de",
)
products = Products(
client_key="...",
secret_key="...",
storefront="de",
)
response = products.get_product(20574181, embedded=["category", "units"])
print(response.payload)
Async Usage
import asyncio
from kaufland.asyncio import Client
from kaufland.asyncio.api.products import Products
async def main():
products = Products(
client_key="...",
secret_key="...",
storefront="de",
)
response = await products.get_product(20574181)
print(response.payload)
await products.close()
asyncio.run(main())
Generated Clients
Generated clients live under kaufland.api (sync) and kaufland.asyncio.api (async). Current client classes:
AssortmentCoverageAttributesBuyboxCarriersCategoriesImportFilesInfoOrderInvoicesOrderUnitsOrdersProductDataProductsReportsReturnUnitsReturnsShipmentsShippingGroupsShippingLabelsStatusSubscriptionsTicketsUnitsVariantSuggestionsWarehouses
Regenerate clients from swagger.json:
uv run python tools/generate_clients.py
Sponsorship
Support ongoing development: https://github.com/sponsors/saleweaver
DISCLAIMER
We are not affiliated with
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 python_kaufland_api-0.1.1.tar.gz.
File metadata
- Download URL: python_kaufland_api-0.1.1.tar.gz
- Upload date:
- Size: 37.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b987d4fd720b8ef54cf8ae4c2810a9315cf4dd8eb4e05b1312299cf1eafeda1c
|
|
| MD5 |
d022dade45229faf51e75c7792692bad
|
|
| BLAKE2b-256 |
8cac187aff833610022181524e720fd5e51ac062e4adb78c9455a40cfed9540c
|
File details
Details for the file python_kaufland_api-0.1.1-py3-none-any.whl.
File metadata
- Download URL: python_kaufland_api-0.1.1-py3-none-any.whl
- Upload date:
- Size: 64.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1b31335df9aa63388c38d66eb7d7e93c160712b3aede9ce47ebb20780e373a2
|
|
| MD5 |
0c6792d473f07fc994d4bb46e56a865c
|
|
| BLAKE2b-256 |
c8533d15bfbb3a711038ad0455c570a1a89da528771927d57133330e5b84d36f
|