Python SDK for ČSOB CEB Business Connector
Project description
ČSOB CEB Business Connector SDK
Production-ready Python SDK for automated file download and upload via ČSOB CEB Business Connector.
Features
- SOAP orchestration:
GetDownloadFileList v4,StartUploadFileList v3,FinishUploadFileList v2 - REST transfer: Streaming download, multipart upload
- mTLS: Certificate validation, PEM/KEY/PFX support
- Stateful idempotency: SQLite persistence with WAL, crash recovery
- Rate limiting: Token bucket per contract/certificate
- Retry policies: Exponential backoff + jitter via tenacity
- Audit logging: Structured JSON logs with redaction
Installation
pip install "csob-ceb-business-connector-sdk[async]"
Quickstart
import asyncio
from pathlib import Path
from csob_ceb_bc import BusinessConnectorClient, ConnectorConfig, CertificateConfig, Environment
from csob_ceb_bc.models import DownloadFilter, UploadFile, UploadMode
async def main():
client = BusinessConnectorClient.from_config(
ConnectorConfig(
environment=Environment.PRODUCTION,
contract_number="YOUR_CONTRACT",
client_app_guid="your-guid",
certificate=CertificateConfig(
cert_file=Path("/secure/cert.crt"),
key_file=Path("/secure/key.key"),
),
state_url="sqlite:////var/lib/csob-ceb/state.db",
)
)
files = await client.download_new_files(
filter=DownloadFilter(file_types=["VYPIS", "AVIZO"]),
target_dir=Path("./inbox"),
)
result = await client.upload_payment_batch(
file=Path("payments.xml"),
metadata=UploadFile(
filename="payments.xml",
format="XML SEPA",
mode=UploadMode.AllOrNothing,
),
)
await client.poll_import_protocols()
await client.resume_pending()
asyncio.run(main())
Configuration
Environment variables (prefix CSOB_BC_):
CSOB_BC_CONTRACT_NUMBER=123456
CSOB_BC_ENVIRONMENT=production
CSOB_BC_CLIENT_APP_GUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
YAML config:
environment: production
contract_number: "123456"
client_app_guid: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
certificate:
cert_file: "/etc/csob/cert.crt"
key_file: "/etc/csob/key.key"
state_url: "sqlite:////var/lib/csob-ceb/state.db"
Security
- Private keys must have permissions
400or600 - Certificate expiry is checked at startup
- Logs redact contract numbers and sensitive URL parameters
- Bank file contents are never logged
verify=Falseis never used
Development
pip install -e ".[dev]"
pytest
ruff check .
ruff format .
mypy src
Troubleshooting
| Issue | Cause | Solution |
|---|---|---|
| SOAP 1101 | Rate limit exceeded | Increase polling interval, check parallel clients |
| SOAP 1011 | Certificate not registered | Register certificate in CEB portal |
| SOAP 1012 | Certificate blocked | Security incident, contact bank |
| HTTP 400/404 | Download URL expired | File older than 15 days, no recovery possible |
| Upload rejected (R) | Duplicate or invalid file | Check hash, format, filename length |
License
MIT
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
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 csob_ceb_business_connector_sdk-0.2.1.tar.gz.
File metadata
- Download URL: csob_ceb_business_connector_sdk-0.2.1.tar.gz
- Upload date:
- Size: 199.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
038929b2ccac7070c0933a693be25034697791d992f813d7e2dc7710e9c530d8
|
|
| MD5 |
72f8f1f5aa9610ff21fa22f520f12169
|
|
| BLAKE2b-256 |
cbfa73d1b9a4afb31905e9380f4c7f2cc743cdba9ed1ebe6cbcaa2616bbd5b64
|
Provenance
The following attestation bundles were made for csob_ceb_business_connector_sdk-0.2.1.tar.gz:
Publisher:
publish.yml on thinkhome-org/csob-ceb-bc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csob_ceb_business_connector_sdk-0.2.1.tar.gz -
Subject digest:
038929b2ccac7070c0933a693be25034697791d992f813d7e2dc7710e9c530d8 - Sigstore transparency entry: 1421968144
- Sigstore integration time:
-
Permalink:
thinkhome-org/csob-ceb-bc@f9a16e814304efd7f03f2c4a5aca481b4508e303 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/thinkhome-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9a16e814304efd7f03f2c4a5aca481b4508e303 -
Trigger Event:
push
-
Statement type:
File details
Details for the file csob_ceb_business_connector_sdk-0.2.1-py3-none-any.whl.
File metadata
- Download URL: csob_ceb_business_connector_sdk-0.2.1-py3-none-any.whl
- Upload date:
- Size: 52.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e397b09ab9d25de62c284d8142ab26f20633d03f654c1d9a2f4e04d85aea1866
|
|
| MD5 |
43f0304723949724036393ba9455f294
|
|
| BLAKE2b-256 |
64326e7d9a8fb4c19029ff1f9176d0e821fd63899a64a43a748173c449b73bf6
|
Provenance
The following attestation bundles were made for csob_ceb_business_connector_sdk-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on thinkhome-org/csob-ceb-bc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
csob_ceb_business_connector_sdk-0.2.1-py3-none-any.whl -
Subject digest:
e397b09ab9d25de62c284d8142ab26f20633d03f654c1d9a2f4e04d85aea1866 - Sigstore transparency entry: 1421968219
- Sigstore integration time:
-
Permalink:
thinkhome-org/csob-ceb-bc@f9a16e814304efd7f03f2c4a5aca481b4508e303 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/thinkhome-org
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f9a16e814304efd7f03f2c4a5aca481b4508e303 -
Trigger Event:
push
-
Statement type: