Python port of the GreenCore/icecat client.
Project description
python-icecat
Icecat client for Python.
Features
Icecat(username, password, http_url=...)client.openCatalog.getProduct(lang, gtin)client.openCatalog.getProductById(lang, product_id)client.openCatalog.getProductBySKU(lang, brand, sku)client.openCatalog.getProductByXMLdata(xml_data)IcecatProductconvenience methods (getTitle,getImages,getSpecifications, etc.)
Install
pip install python-icecat
Quick start
from icecat import Icecat
client = Icecat("your_username", "your_password")
product = client.openCatalog.getProduct("EN", "4948570114344")
print(product.getTitle())
images = product.getImages()
if images:
print(images[0].ThumbImg)
CLI usage (main.py)
Use credentials from args or environment:
export ICECAT_USERNAME="your_username"
export ICECAT_PASSWORD="your_password"
Fetch by GTIN:
python main.py --lang EN --output summary gtin 4948570114344
Fetch by Icecat product ID:
python main.py --lang EN --output json id 29900045
Fetch by vendor + SKU:
python main.py --lang EN sku iiyama X4071UHSU-B1
Parse local XML file (no credentials required):
python main.py --output json xml ./product.xml
Public API
Icecat
Icecat(username, password, http_url="data.icecat.biz/xml_s3/xml_server3.cgi")- Field:
openCatalog(OpenCatalogService)
OpenCatalogService
getProduct(lang, gtin) -> IcecatProductgetProductById(lang, product_id) -> IcecatProductgetProductBySKU(lang, brand, sku) -> IcecatProductgetProductByXMLdata(xml_data) -> IcecatProduct
IcecatProduct
getReturnCode() -> int | NonegetErrorMessage() -> str | NonegetName() -> str | NonegetTitle() -> str | NonegetReleaseDate() -> str | NonegetLongDescription() -> str | NonegetShortDescription() -> str | NonegetProductInfoPDFurl() -> str | NonegetProductManualPDFurl() -> str | NonegetProductUrl() -> str | NonegetSupplier() -> str | NonegetCategory() -> str | NonegetFamily() -> ProductFamily | NonegetID() -> str | NonegetEan() -> str | NonegetImages() -> list[ProductImage]getSpecifications() -> list[ProductSpecification]getMultimediaObjects() -> list[MultimediaObject]getCategoryFeatureGroups() -> list[CategoryFeatureGroup]
IcecatProduct types
ProductFamily(id: str | None, name: str | None)ProductImage(IsMain, HighImg, LowImg, ThumbImg)ProductSpecification(name, presentationValue, value, specId, specGroupId)(all fields can beNone)MultimediaObject(contentType, thumbPic, description, keepAsURL, size, url)CategoryFeatureGroup(id: str | None, name: str | None)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
python_icecat-0.1.0.tar.gz
(6.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_icecat-0.1.0.tar.gz.
File metadata
- Download URL: python_icecat-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b383c90be6df2e0ed44d4c15a0b5667514173d8148df614fdcf1f052fc6f64f
|
|
| MD5 |
cfc38aa36fae5375eeb1a53712a2c0d5
|
|
| BLAKE2b-256 |
2ee0f99eddcf66ca5c9a35a070cd64c0d340fca183d961f43b945766cc60548c
|
File details
Details for the file python_icecat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: python_icecat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4805d5ec405047eceebf8c621dbd2f06a0ad644dec0f1e393471b744028fb5d5
|
|
| MD5 |
9195fcbe507873f33be0ea54cd92fef7
|
|
| BLAKE2b-256 |
8ec783b8cb28ed2b34ef69da41fcc35228c9a0680fdb0698b9dc928a6d59d2d6
|