Skip to main content

prestapyt is a library for Python to interact with the PrestaShop’s Web Service API.

Learn more about the PrestaShop Web Service from the [Official Documentation](http://doc.prestashop.com/display/PS14/Using+the+REST+webservice).

prestapyt is a direct port of the PrestaShop PHP API Client, PSWebServiceLibrary.php Similar to PSWebServiceLibrary.php, prestapyt is a thin wrapper around the PrestaShop Web Service: it takes care of making the call to your PrestaShop instance’s Web Service, supports the Web Service’s HTTP-based CRUD operations (handling any errors) and then returns the XML ready for you to work with in Python (as well as prestasac if you work with scala)

Beta version, the post and put doesn’t yet work.

#Installation TODO

#Usage

from prestapyt import PrestaShopWebServiceError, PrestaShopWebService

prestashop = PrestaShopWebService(’http://localhost:8080/api’, ‘BVWPFFYBT97WKM959D7AVVD0M4815Y1L’) # messages will be as xml # or prestashop = PrestaShopWebServiceDict(’http://localhost:8080/api’, ‘BVWPFFYBT97WKM959D7AVVD0M4815Y1L’) # messages will be as dict

# get all addresses prestashop.get(‘addresses’) # returns ElementTree (PrestaShopWebService) or dict (PrestaShopWebServiceDict)

# get all addresses prestashop.get(‘addresses’) # returns ElementTree

# get address 1 prestashop.get(‘addresses’, resource_id=1) prestashop.get(‘addresses/1’)

# full url prestashop.get(’http://localhost:8080/api/addresses/1’)

#filters prestashop.get(‘addresses’, options={‘limit’: 10})

# head print prestashop.head(‘addresses’)

# delete a resource prestashop.delete(‘addresses’, resource_ids=4)

# delete many resources prestashop.delete(‘addresses’, resource_ids=[5,6])

# add prestashop.add(‘addresses’, xml)

# edit prestashop.edit(‘addresses’, 5, xml)

# get a blank xml prestashop.get(‘addresses’, options={‘schema’: ‘blank’})

#API Documentation Documentation for the PrestaShop Web Service can be found on the PrestaShop wiki: [Using the REST webservice](http://doc.prestashop.com/display/PS14/Using+the+REST+webservice)

#Credits: Thanks to Prestashop SA for their PHP API Client PSWebServiceLibrary.php

Thanks to Alex Dean for his port of PSWebServiceLibrary.php to the Scala language, prestasac (https://github.com/orderly/prestashop-scala-client) from which I also inspired my library.

#Copyright and License

prestapyt is copyright (c) 2012 Guewen Baconnier

prestapyt is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

prestapyt is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License along with prestapyt. If not, see [GNU licenses](http://www.gnu.org/licenses/).

Release files for prestapyt 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prestapyt 0.4.0
File Size Uploaded
prestapyt-0.4.0.tar.gz 10.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for prestapyt 0.4.0
File Interpreter ABI Platform
prestapyt-0.4.0-py2.7.egg Legacy Egg format - - Details
prestapyt-0.4.0-py2.6.egg Legacy Egg format - - Details

Total release size: 59.3 kB

Release files / prestapyt-0.4.0.tar.gz

Download URL prestapyt-0.4.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9f19d768e3073dd273d6d1f710262f8cd782608bc3de6cf9bda379aa20651f9c
BLAKE2b-256 checksum
How to use checksums
c6aa31c284803b8052d8700992197fdde3e6e4fcee5aa3388769d8465e977789
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / prestapyt-0.4.0-py2.7.egg

Download URL prestapyt-0.4.0-py2.7.egg
Size 24.5 kB
Tags Egg
SHA-256 checksum
How to use checksums
eccb94ecaa9876e210a539f996807b5e5e8ebb78ba315e03da61c2624ba08af5
BLAKE2b-256 checksum
How to use checksums
864b1390b51639ec26d90ba89a8f9c74ddaa4819c36e7bf312973d9e1dddc673
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / prestapyt-0.4.0-py2.6.egg

Download URL prestapyt-0.4.0-py2.6.egg
Size 24.6 kB
Tags Egg
SHA-256 checksum
How to use checksums
d6ce09022bd6704338bfcc9d9c7a0937eba556dcae439fc141f17305e2688666
BLAKE2b-256 checksum
How to use checksums
218e7cbc93fa7abdd8d6d2e4c812fb96ffafb4394253ac0ca41051b8bfe65852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.2

2 release files

0.9.0

3 release files

0.8.0

3 release files

0.7.0

3 release files

0.6.3

3 release files

0.6.2

3 release files

0.6.1

3 release files

0.6.0

3 release files

0.5.3

3 release files

0.5.2

2 release files

0.5.1

3 release files

0.5.0

2 release files

This release

0.4.0 This release

3 release files

0.3.1

3 release files

0.3.0

3 release files

0.2.1

3 release files

0.2.0

3 release files

0.1.1

3 release files

0.1.0

3 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page