Skip to main content

A library to access Prestashop Web Service from Python.

Project description

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’)

# 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/).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prestapyt-0.2.0.tar.gz (9.7 kB view details)

Uploaded Source

Built Distributions

prestapyt-0.2.0-py2.7.egg (23.4 kB view details)

Uploaded Source

prestapyt-0.2.0-py2.6.egg (23.5 kB view details)

Uploaded Source

File details

Details for the file prestapyt-0.2.0.tar.gz.

File metadata

  • Download URL: prestapyt-0.2.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for prestapyt-0.2.0.tar.gz
Algorithm Hash digest
SHA256 afd01da05ca77fb72f4e6af1d7e662a2d47ec1c2c25fe4439a6b783a118d433f
MD5 00dbc32a89a4401f6958d2f76d1742c1
BLAKE2b-256 bdd6488a2cb174dad943a378ee5de87e9f39339e3312581e27d39997ee4d2a11

See more details on using hashes here.

File details

Details for the file prestapyt-0.2.0-py2.7.egg.

File metadata

File hashes

Hashes for prestapyt-0.2.0-py2.7.egg
Algorithm Hash digest
SHA256 7166f46c150abbe4ec2bcb911320df2cb2ae1121cd7218d1827a8e74eb998ae1
MD5 70c1b656887d3400648aa1ec1f604554
BLAKE2b-256 d5d599bfd8238558c336e0f6dcece057ba0b20f6ae74815a03303eae9f3fece9

See more details on using hashes here.

File details

Details for the file prestapyt-0.2.0-py2.6.egg.

File metadata

File hashes

Hashes for prestapyt-0.2.0-py2.6.egg
Algorithm Hash digest
SHA256 a5f6541a1def4eefba035ad66afa868aeb0500a45bf1e06f02be2aa0f65fae1b
MD5 33325eb36bc22fdd9aced67b43744bba
BLAKE2b-256 a9fdaecd8666263b430e428e6399b4f720eaa39fadb0d82bc0e6719d6d8ca0c6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page