Easy python integrations for the Copaco Customer Connections
Project description
python-copaco-connections
Easy python integrations for the Copaco Customer Connections
Limitations
This package is limited to the Copaco BE - Dutch Productlist in CSV format via FTP. Might be extended in the future.
More info here: https://www.copaco.com/en-be/customer-service-e-commerce-fulfillment
Getting started
Install
Install with pip.
pip install python-copaco-connections
Import
Import the package and the CopacoConnectionBE object.
from copaco.connection import CopacoConnectionBE
Setup connection
Make the connection with your provided FTP credentials.
conn = CopacoConnectionBE(FTP_HOST, FTP_LOGIN, FTP_PASSWD)
Pricelist
You can retrieve the pricelist as follows:
priceList = conn.priceList.get()
This will return an ordinary list which contains PriceListItem objects.
You can find the attributes of this object and their use below:
PriceListItem object
Attribute | Contains |
---|---|
article | Article number |
vendorCode | Unique vendor code |
description | Short description |
price | Price, excluding levies |
priceWithLevies | Price, including levies |
stock | Amount of stock available |
hierarchy | Product hierarchy |
unspscCode | UNSPSC code |
EAN | EAN code |
statusCode | Status code (0 - 12). Refer to docs. |
status | Human-readable status |
auvibel | Price of Auvibel |
reprobel | Price of Reprobel |
recupel | Price of Recupel |
bebat | Price of Bebat |
nextDelivery | Next delivery date of this product |
nextDeliveryAmount | Amount that will be delivered on next delivery |
inventoryStatusCode | ATP code |
inventoryStatus | Human-readable ATP code |
Sample script
Show all articles with their prices, including levies.
from copaco.connection import CopacoConnectionBE
HOST = 'ftp.copaco.com'
LOGIN = 'XXXX'
PASSWD = 'XXXX'
conn = CopacoConnectionBE(HOST, LOGIN, PASSWD)
priceList = conn.priceList.get()
for item in priceList:
formattedStr = '{description} - {number} - € {price}'.format(description=item.description, number=item.article, price=item.priceWithLevies)
print(formattedStr)
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
Hashes for python-copaco-connections-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5315a16cdc89d6617ed085b6196f12a1a69caa6926812970dce09299055873 |
|
MD5 | fb17267196a921a20b1f5d5fedb7e2e2 |
|
BLAKE2b-256 | 9e5f4d66d6ae473a25a0579e9a56b782af5749350fd0d89ae09c5bbe87f2a545 |