Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vernon-gant/prestashop-orders-client
PrestaShop Orders Client - A simple Python library, published on PyPI, designed specifically for extracting orders using the PrestaShop API.
https://github.com/vernon-gant/prestashop-orders-client
custom-library prestashop pypi-package python
Last synced: 3 days ago
JSON representation
PrestaShop Orders Client - A simple Python library, published on PyPI, designed specifically for extracting orders using the PrestaShop API.
- Host: GitHub
- URL: https://github.com/vernon-gant/prestashop-orders-client
- Owner: vernon-gant
- License: apache-2.0
- Created: 2023-01-12T08:37:36.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-26T16:17:49.000Z (over 1 year ago)
- Last Synced: 2024-11-13T11:42:09.502Z (about 1 month ago)
- Topics: custom-library, prestashop, pypi-package, python
- Language: Python
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PrestaShop Orders Client
**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!
```python
>>> 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
8
```*Ensure your server has an SSL certificate installed, as the PrestaShop API requires it, and our client uses "https" for performing requests.*
## Installation
The client is available on PyPI and requires Python 3.10+
```console
$ python -m pip install prestashop_orders_client
```## Important Notes
- Ensure the WebService is enabled in your PrestaShop Admin Panel (Advanced Parameters -> Webservice).
- Create an API Key for your WebService (Advanced Parameters -> Webservice -> Add new key).
- Grant GET permissions to these resources at a minimum : **addresses, countries, customers, orders_states, orders, states**## License
The project is licensed under the Apache 2.0 License.