Skip to main content

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

python-copaco-connections-0.1.1.tar.gz (18.1 kB view hashes)

Uploaded Source

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