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.7.tar.gz (52.9 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.7-py3-none-any.whl (48.3 kB view details)

Uploaded Python 3

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

Hashes for m2_sdk-0.1.7.tar.gz
Algorithm Hash digest
SHA256 423e9c75df525a29530affabe02d32ddc194f6cef22a81172e4cdb910be04db0
MD5 b700f5c0a518cfeacd858b508ea2322e
BLAKE2b-256 14a103676b90b3cb6bfd3411ac828868b292ad9de6ac5b6112e11633248cc826

See more details on using hashes here.

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

Hashes for m2_sdk-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2f7daaabf1d0d2dc0158125fd6c16805edf57a33e57beeeeec372279693cf33f
MD5 7fe595d93186afc5425f38a9538b9080
BLAKE2b-256 8babd6b668482fea1cc114307e3bebc54ab66d80c395f6339993858e4f0a9251

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