Metadata-Version: 2.4
Name: mpt-api-client
Version: 5.4.0
Summary: SoftwareOne Marketplace API Client for Python
Author: SoftwareOne AG
License: Apache-2.0 license
License-File: LICENSE
Keywords: client,marketplace,openapi,softwareone
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Utilities
Requires-Python: <4,>=3.12
Requires-Dist: httpx==0.28.*
Description-Content-Type: text/markdown

# mpt-api-python-client

mpt-api-python-client is a Python client for interacting with the MPT API

## Installation

Install with pip or your favorite PyPI package manager:

```bash
pip install mpt-api-client
```

```bash
uv add mpt-api-client
```

## Prerequisites

- Python 3.12+ in your environment

## Usage

```python
from mpt_api_client import MPTClient

# client = MPTClient(api_key=<your_api_key>, base_url=<mpt_api_url>)
client = MPTClient()  # Reads MPT_API_TOKEN and MPT_API_BASE_URL from the environment

for product in client.catalog.products.iterate():
    print(product.name)
```

## Async Usage

```python
import asyncio
from mpt_api_client import AsyncMPTClient


async def main():
    # client = AsyncMPTClient(api_key=<your_api_key>, base_url=<mpt_api_url>)
    client = AsyncMPTClient()  # Reads MPT_API_TOKEN and MPT_API_BASE_URL from the environment
    async for product in client.catalog.products.iterate():
        print(product.name)


asyncio.run(main())
```

## Development

For development purposes, please, check the Readme in the GitHub repository.
