MyMagento πο

MyMagento
A Python package that wraps and extends the Magento 2 REST API
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 SearchQuery
and Subclasses
execute()
predefined or custom search queries on any endpointSupports simple and advanced searches using REST endpoints
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