Magento 2 REST API SDK
Project description
m2-sdk
Magento 2 REST API SDK
Installation
pip install m2-sdk
Usage
from m2_sdk import M2Client, get_config
from m2_sdk.auth import AuthManager
config = get_config()
auth = AuthManager(config)
client = M2Client(config, auth)
# List products
products = client.products().limit(10).get()
# Stream pages concurrently after page 1 reveals total_count
async for page in client.products().aiter_pages_concurrent(page_size=100, concurrency=4):
for item in page["items"]:
print(item["sku"])
# Build an async catalog with concurrent pagination
catalog = await client.acatalog("products", page_size=100, concurrency=4)
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
m2_sdk-0.1.7.tar.gz
(52.9 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
m2_sdk-0.1.7-py3-none-any.whl
(48.3 kB
view details)
File details
Details for the file m2_sdk-0.1.7.tar.gz.
File metadata
- Download URL: m2_sdk-0.1.7.tar.gz
- Upload date:
- Size: 52.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
423e9c75df525a29530affabe02d32ddc194f6cef22a81172e4cdb910be04db0
|
|
| MD5 |
b700f5c0a518cfeacd858b508ea2322e
|
|
| BLAKE2b-256 |
14a103676b90b3cb6bfd3411ac828868b292ad9de6ac5b6112e11633248cc826
|
File details
Details for the file m2_sdk-0.1.7-py3-none-any.whl.
File metadata
- Download URL: m2_sdk-0.1.7-py3-none-any.whl
- Upload date:
- Size: 48.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f7daaabf1d0d2dc0158125fd6c16805edf57a33e57beeeeec372279693cf33f
|
|
| MD5 |
7fe595d93186afc5425f38a9538b9080
|
|
| BLAKE2b-256 |
8babd6b668482fea1cc114307e3bebc54ab66d80c395f6339993858e4f0a9251
|