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.0.tar.gz (37.5 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.0-py3-none-any.whl (64.0 kB view details)

Uploaded Python 3

File details

Details for the file python_kaufland_api-0.1.0.tar.gz.

File metadata

  • Download URL: python_kaufland_api-0.1.0.tar.gz
  • Upload date:
  • Size: 37.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for python_kaufland_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 27c54980e98ca0a410fe7737c3244e6bfd1c4184a3c2d659602d4e6fb22ef6ff
MD5 4d1960aaa8e4188f4a6a278f4b8c92c4
BLAKE2b-256 874201a4034a1ca9df621b994a04de3c44f61019dffbef3b8e1777e298fa4a70

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for python_kaufland_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a98dac55a107d14580a817b651288929451d6bd952cf8c48745c30e95f4ab5c
MD5 69f18a7fe9d91745baaabd1f82086c93
BLAKE2b-256 f7008175c5e68fdebea52a021627709b75e5f0fec5923e731436fbbbbceda32c

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