MyMagento πŸ›’οƒ

MyMagento

A Python package that wraps and extends the Magento 2 REST API

PyPI Version https://static.pepy.tech/personalized-badge/my-magento?period=total&units=none&left_color=grey&right_color=blue&left_text=Downloads Documentation Status


About MyMagento

What’s MyMagento?

MyMagento is a highly interconnected package that wraps and extends the Magento 2 REST API, providing a more intuitive and user-friendly interface to access and update your store.

…

MyMagento simplifies interaction with the Magento 2 REST API

If you’ve worked with the Magento 2 API, you’ll know that not all endpoints are created equally.

MyMagento aims to streamline your workflow, offering efficient API wrapper methods for a large number of API operations across multiple endpoints. It takes care of the small details so that you can stay focused on the more important aspects of managing your store.

…

Main Components

The Client

  • Handles all interactions with the API, with support for multiple store views

  • Accessible from all objects created by the package

The Model Subclasses

  • Wrap all API responses in the package

  • Provide additional endpoint-specific functionality for data updates and retrieval

…

Installation

Installing MyMagento

To install using pip:

pip install my-magento

Please note that MyMagento requires Python >= 3.10

…

QuickStart: Login with MyMagento

Use the credentials of your Magento 2 admin account to initialize and authenticate() a Client

from magento import Client

>>> api = Client('website.com','username', 'password', login=False)
>>> api.authenticate()

|[ MyMagento | website_username ]|:  Authenticating username on website.com...
|[ MyMagento | website_username ]|:  Logged in to username

Once you initialize a Client, you have a few ways to start Interacting with the API

…