SoftwareOne Marketplace API Client for Python
Project description
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:
pip install mpt-api-client
uv add mpt-api-client
Prerequisites
- Python 3.12+ in your environment
Usage
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
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.
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
mpt_api_client-5.4.0.tar.gz
(49.6 kB
view details)
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 mpt_api_client-5.4.0.tar.gz.
File metadata
- Download URL: mpt_api_client-5.4.0.tar.gz
- Upload date:
- Size: 49.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
abd7a60e00cbb0a7e8d66e14dec9f415a4d5a020dec5f7b2534a60d62cde0a74
|
|
| MD5 |
95b78342d4a86a222f83aa48d69ef910
|
|
| BLAKE2b-256 |
4641d5ec7ee9e6d626c0bcff192eb481ff8f1b77a8cd0583a188d3833ff72c79
|
File details
Details for the file mpt_api_client-5.4.0-py3-none-any.whl.
File metadata
- Download URL: mpt_api_client-5.4.0-py3-none-any.whl
- Upload date:
- Size: 111.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2b8798a57a5a5737094a70c19eae0e32d12a2c83c25d7582b3252f64a80f835
|
|
| MD5 |
069f0a31416f92ab3ba9033039e0b466
|
|
| BLAKE2b-256 |
bd991ae0a342ee580e44017c6775a882c1a318f7eac7a79eab6255c906a4edb2
|