Skip to main content

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_KEY
  • KAUFLAND_SECRET_KEY
  • KAUFLAND_USER_AGENT
  • KAUFLAND_STOREFRONT (optional default)
  • KAUFLAND_PARTNER_CLIENT_KEY (optional)
  • KAUFLAND_PARTNER_SECRET_KEY (optional)
  • KAUFLAND_SIGNATURE_ENCODING (hex default, base64 optional)

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:

  • AssortmentCoverage
  • Attributes
  • Buybox
  • Carriers
  • Categories
  • ImportFiles
  • Info
  • OrderInvoices
  • OrderUnits
  • Orders
  • ProductData
  • Products
  • Reports
  • ReturnUnits
  • Returns
  • Shipments
  • ShippingGroups
  • ShippingLabels
  • Status
  • Subscriptions
  • Tickets
  • Units
  • VariantSuggestions
  • Warehouses

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_kaufland_api-0.1.1.tar.gz (37.4 kB view details)

Uploaded Source

Built Distribution

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

python_kaufland_api-0.1.1-py3-none-any.whl (64.0 kB view details)

Uploaded Python 3

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

Hashes for python_kaufland_api-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b987d4fd720b8ef54cf8ae4c2810a9315cf4dd8eb4e05b1312299cf1eafeda1c
MD5 d022dade45229faf51e75c7792692bad
BLAKE2b-256 8cac187aff833610022181524e720fd5e51ac062e4adb78c9455a40cfed9540c

See more details on using hashes here.

File details

Details for the file python_kaufland_api-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for python_kaufland_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c1b31335df9aa63388c38d66eb7d7e93c160712b3aede9ce47ebb20780e373a2
MD5 0c6792d473f07fc994d4bb46e56a865c
BLAKE2b-256 c8533d15bfbb3a711038ad0455c570a1a89da528771927d57133330e5b84d36f

See more details on using hashes here.

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