Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gearplug/prestashop-python
prestashop-python is an API wrapper for Prestashop, written in Python.
https://github.com/gearplug/prestashop-python
api customer ecommerce library prestashop python requests shopping-cart wrapper
Last synced: 13 days ago
JSON representation
prestashop-python is an API wrapper for Prestashop, written in Python.
- Host: GitHub
- URL: https://github.com/gearplug/prestashop-python
- Owner: GearPlug
- License: mit
- Created: 2023-02-13T16:39:28.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-11T14:57:03.000Z (over 1 year ago)
- Last Synced: 2024-11-01T23:06:38.436Z (13 days ago)
- Topics: api, customer, ecommerce, library, prestashop, python, requests, shopping-cart, wrapper
- Language: Python
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# prestashop-python
![](https://img.shields.io/badge/version-0.1.4-success) ![](https://img.shields.io/badge/Python-3.8%20|%203.9%20|%203.10%20|%203.11-4B8BBE?logo=python&logoColor=white)*prestashop-python* is an API wrapper for Prestashop, written in Python.
## Installing
```
pip install prestashop-python
```
## Usage
```
client = Client(webservice_key, domain)
```
### Check API features
```
response = client.check_api_features()
```
### List service (customers, orders, carts, countries, states...)
```
response = client.list_service(service, filter_field=None, filter_operator=None, filter_value=None, is_date_filter=False,
sort_field=None, sort_order="ASC", limit=100)
# Some service options are: "customers", "orders", "carts", "countries", "states", "addresses"
# Filter operation options = "!" not equal, "" equal, ">" greater than,"<" less than
# set is_date_filter to True if you are filtering a date field.
```
For a full list of available services, check: https://devdocs.prestashop-project.org/8/webservice/resources/
### List inactive carts
```
response = client.list_inactive_carts(inactive_before, inactive_from=None, sort_field=None, sort_order="ASC", limit=100)
# Checks all carts without an order and inactive before parameter 'inactive_before'.
# If 'inactive_from' is added, it will check inactive carts between inactive_from and inactive_before time.
# inactive_before and inactive_from format must be: 2023-02-13 13:31:28 (string).
# Sort order only works if sort_field is added.
```