Skip to content

prestashop-python is an API wrapper for Prestashop, written in Python.

License

Notifications You must be signed in to change notification settings

GearPlug/prestashop-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

prestashop-python

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. 

Releases

No releases published

Packages

No packages published

Languages