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.3.1.tar.gz
(42.5 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.3.1.tar.gz.
File metadata
- Download URL: mpt_api_client-5.3.1.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0096bb28f9335fac636d891a6616ad257a7f7b4d79d21c582b8681c479716c6
|
|
| MD5 |
6cfec22853eb717a2b7f7bf90b5b7884
|
|
| BLAKE2b-256 |
a8d035e3dfa2c656c24a5e54945d23786ae49662e6812126994bea4ab1d05a69
|
File details
Details for the file mpt_api_client-5.3.1-py3-none-any.whl.
File metadata
- Download URL: mpt_api_client-5.3.1-py3-none-any.whl
- Upload date:
- Size: 93.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.7.22
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72fcf79140b853429c89f68d30ec43d8dcf6677d7e1a50538a1506dfaa9e8d26
|
|
| MD5 |
7498835cbdcf70255e721baef7dc5583
|
|
| BLAKE2b-256 |
40120a12a107116a46e195ea069d7bcfb6e143c37d98bb89a7d4c21efde338e8
|