Python client for Cebeo B2B XML API
Project description
cebeo-client
Python client for Cebeo's B2B XML API.
Installation
pip install cebeo-client
Usage
from cebeo_client import CebeoClient
client = CebeoClient(
customer_number="123456",
username="your_username",
password="your_password",
)
# Lookup articles by Cebeo article IDs
articles = client.article_get(["169509", "171418"])
for article in articles:
print(f"{article.supplier_item_id}: {article.description}")
print(f" Price: {article.net_price} EUR")
print(f" Stock: {article.stock} ({article.stock_code})")
print(f" Available: {article.is_available}")
# Search for articles
result = client.article_search(keywords=["XVB"], brand_keywords=["Niko"])
print(f"Found {result.total_count} articles")
for article in result.articles:
print(f" {article.reference}: {article.description}")
Configuration
client = CebeoClient(
customer_number="123456",
username="user",
password="pass",
base_url="https://b2b.cebeo.be/webservices/xml", # default
timeout=30, # request timeout in seconds
batch_size=50, # max articles per API request
)
Error Handling
from cebeo_client import CebeoAPIError, CebeoAuthError, CebeoConnectionError
try:
articles = client.article_get(["123"])
except CebeoAuthError as e:
print(f"Authentication failed: {e}")
except CebeoAPIError as e:
print(f"API error {e.code}: {e.message}")
except CebeoConnectionError as e:
print(f"Connection failed: {e}")
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linter
ruff check src tests
License
MIT
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
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 cebeo_client-0.4.0.tar.gz.
File metadata
- Download URL: cebeo_client-0.4.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b066cc9468a1cacbbd5feb7b5e4045a745e4e0d41de9cf6a40823bdc4571603c
|
|
| MD5 |
2be4f101d59d7d9cbcc19cb9cbc08e28
|
|
| BLAKE2b-256 |
04fe89a04982e7a2c3c125e09bdd9f5048d40715344a424eb140a835e8c46290
|
Provenance
The following attestation bundles were made for cebeo_client-0.4.0.tar.gz:
Publisher:
publish.yml on elektriciteit-steen/cebeo-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cebeo_client-0.4.0.tar.gz -
Subject digest:
b066cc9468a1cacbbd5feb7b5e4045a745e4e0d41de9cf6a40823bdc4571603c - Sigstore transparency entry: 749258171
- Sigstore integration time:
-
Permalink:
elektriciteit-steen/cebeo-client@21b71622355dca7d4e6594cae585fc8448e9454c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/elektriciteit-steen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21b71622355dca7d4e6594cae585fc8448e9454c -
Trigger Event:
release
-
Statement type:
File details
Details for the file cebeo_client-0.4.0-py3-none-any.whl.
File metadata
- Download URL: cebeo_client-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a1f39c2b57744f7950de6245f3b8e43b8e39f616cc77243d043ab496dd56b78
|
|
| MD5 |
5e45f80ad3af93cb915211aabc04de64
|
|
| BLAKE2b-256 |
05162c7031bec3bec59963142431702cfe5eccde46f8193a7d576164a4cf5558
|
Provenance
The following attestation bundles were made for cebeo_client-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on elektriciteit-steen/cebeo-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cebeo_client-0.4.0-py3-none-any.whl -
Subject digest:
5a1f39c2b57744f7950de6245f3b8e43b8e39f616cc77243d043ab496dd56b78 - Sigstore transparency entry: 749258176
- Sigstore integration time:
-
Permalink:
elektriciteit-steen/cebeo-client@21b71622355dca7d4e6594cae585fc8448e9454c -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/elektriciteit-steen
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@21b71622355dca7d4e6594cae585fc8448e9454c -
Trigger Event:
release
-
Statement type: