Skip to main content

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.8.tar.gz (54.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

m2_sdk-0.1.8-py3-none-any.whl (48.7 kB view details)

Uploaded Python 3

File details

Details for the file m2_sdk-0.1.8.tar.gz.

File metadata

  • Download URL: m2_sdk-0.1.8.tar.gz
  • Upload date:
  • Size: 54.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for m2_sdk-0.1.8.tar.gz
Algorithm Hash digest
SHA256 aef0a93c1d60cc732283c1741ca5f73d44e44eb9c96f5c3eaaf23321e208eb55
MD5 68ecc2631c188cd672c3a3c522019875
BLAKE2b-256 ab1708fe9c1018c18dab5281b3a7916ba7baea4d7ee1fa2d7bad837eb85870a6

See more details on using hashes here.

File details

Details for the file m2_sdk-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: m2_sdk-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 48.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for m2_sdk-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 9eae22ef129cee557f86ba9e94e3c89e35796a59aeb53524dd7f8853caf2476a
MD5 3d553065a13293c9239e66bbac0ad154
BLAKE2b-256 b64bc0b3040e9ad167b126222d6e92c8a4302d589a1b3aec28af307ff452acb2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page