Metadata-Version: 2.4
Name: python-kaufland-api
Version: 0.1.0
Summary: Python wrapper for the Kaufland Marketplace Seller API
Author: Michael Primke
License: MIT License
        
        Copyright (c) 2026 Michael Primke
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
Project-URL: Sponsor, https://github.com/sponsors/saleweaver
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Requires-Dist: twine>=5.0.0; extra == "dev"
Requires-Dist: black>=24.0.0; extra == "dev"
Requires-Dist: ruff>=0.3.0; extra == "dev"
Requires-Dist: pytest>=8.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23.0; extra == "dev"
Dynamic: license-file

# 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

```bash
pip install python-kaufland-api
```

For development:

```bash
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

```python
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

```python
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`:

```bash
uv run python tools/generate_clients.py
```

## Sponsorship

Support ongoing development: https://github.com/sponsors/saleweaver

## DISCLAIMER

We are not affiliated with
