Python client for the Magento 2 API
Project description
PyMagento
PyMagento is a Python client for the Magento 2 API. Its goal is to provide an easy-to-use Pythonic interface to the Magento 2 API, while being lightweight and extendable.
Note: PyMagento is not affiliated to nor endorsed by Adobe or the Magento team.
Install
We support Python 3.8+.
Pip
python -m pip install pymagento
Poetry
poetry add pymagento
Usage
import magento
client = magento.Magento(base_url="...", token="...", scope="all")
product = client.get_product("SKU123")
print(magento.get_custom_attribute(product, "description"))
for order in client.get_orders(status="processing"):
print(order["increment_id"], order["grand_total"])
For more information, read the docs.
Note: not all endpoints are implemented with dedicated methods; you can still call them with
client.get_json_api("/V1/...")
for GET
endpoints and client.post_json_api("/V1/...", json=...)
.
License
Copyright 2020-2024 Bixoto.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pymagento-1.10.1.tar.gz
(18.3 kB
view hashes)
Built Distribution
pymagento-1.10.1-py3-none-any.whl
(20.2 kB
view hashes)
Close
Hashes for pymagento-1.10.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a13301c646f683faadfcab8f4558dbed216dc3c93a229c07daf17ea0cb3bac6d |
|
MD5 | 11abb5fc1817d183b0f777a87de8bc91 |
|
BLAKE2b-256 | a0adadfc4eaa7ad6cbb260afa551b24bd627f6f4fe6a661bcaac7cee8290cedc |