MyMagento πο
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 a number of methods for common API operations.
Main Componentsο
The Client
Handles all API interactions
Supports multiple store views
Provides access to all other package components
The SearchQuery
and Subclasses
execute()
a predefined or custom searchquery
on any endpointSimplifies the construction of basic and advanced searches using REST endpoints
The Model
Subclasses
Wrap all API responses in the package
Provide additional endpoint-specific methods to retrieve and update data
β¦
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
β¦