prestashop orders client
1.0.0
PrestaShop Orders Client is a simple, thoroughly tested client for the PrestaShop API designed to extract order data seamlessly. Initially created to meet our automation needs for tasks such as sending fresh paid orders to our postal service, we decided to share this easy-to-use client with the community. We hope it proves useful to others as well!
>>> from prestashop_orders_client import PrestaShopOrderClient
>>> client = PrestaShopOrderClient(shop_link="myshop.com", api_key="my_api_key")
>>> client.get_order(1)
Order(id=1, total_paid=500.0, reference='ABCD'
order_state='Shipped', email='[email protected]',
first_name='John', last_name='Doe',
company_name=None, phone='+12345678',
address='Example address',
city='Example city', post_code='123456',
country='Example country', state=None)
>>> client.get_all_orders()
[
Order(id=1, total_paid=500.0, reference='ABCD'
order_state='Shipped', email='[email protected]',
first_name='John', last_name='Doe',
company_name=None, phone='+12345678',
address='Example address',
city='Example city', post_code='123456',
country='Example country', state=None),
Order(id=2, total_paid=1000.0, reference='ABCD'
order_state='Shipped', email='[email protected]',
first_name='John', last_name='Doe',
company_name=None, phone='+12345678',
address='Example address',
city='Example city', post_code='123456',
country='Example country', state=None),
....
]
>>> client.orders_amount
8Ensure your server has an SSL certificate installed, as the PrestaShop API requires it, and our client uses "https" for performing requests.
The client is available on PyPI and requires Python 3.10+
$ python -m pip install prestashop_orders_clientThe project is licensed under the Apache 2.0 License.