Python client for the ebms-core (eluinstra/ebms-core) REST API.
Project description
ebms-adapter-client
A minimal Python client for the REST API exposed by
eluinstra/ebms-core (branch
ebms-core-2.20.x), an ebMS (Electronic Business Messaging Service)
adapter/core used to send and receive ebMS messages between trading
partners.
[!NOTE] This package only talks to ebms-core's HTTP/JSON REST API — it doesn't implement ebMS/SOAP itself.
Endpoint coverage
ebms-core mounts its REST API at {base_url}/service/rest/v19/... (see
EmbeddedWebConfig.java/Start.java in the sibling ebms-admin repo, which
is what actually deploys ebms-core). Four JSON resource groups are covered:
/cpas— Collaboration Protocol Agreement (CPA) management/urlMappings— URL mapping management/certificateMappings— certificate mapping management/ebms— message submission, retrieval, status, and event polling
The MTOM/multipart variants (POST /ebms/messages/mtom,
GET /ebms/messages/mtom/{messageId}) are intentionally not implemented —
the JSON DataSource model (Base64-encoded content) covers attachments for
the plain JSON endpoints.
Installation
pip install ebms-adapter-client
Usage
from ebms_adapter_client import (
DataSource,
EbmsAdapterClient,
EbmsAdapterClientConfig,
MessageRequest,
MessageRequestProperties,
)
config = EbmsAdapterClientConfig(
base_url="http://localhost:8080",
username="user", # omit if the server runs without --authentication
password="pass",
)
with EbmsAdapterClient(config) as client:
message_id = client.send_message(
MessageRequest(
properties=MessageRequestProperties(
cpa_id="cpa-1",
from_party_id="party-a",
service="my-service",
action="my-action",
),
data_sources=[
DataSource(content_type="application/pdf", content=b"...", name="letter.pdf"),
],
)
)
status = client.get_message_status(message_id)
Configuration
EbmsAdapterClientConfig builds the full API base URL as
{base_url}{service_path}{api_path}, defaulting to /service + /rest/v19
to match ebms-admin's default wiring. Override service_path/api_path if a
reverse proxy changes that layout.
Auth
- No credentials (
username=None) → noAuthorizationheader is sent, matching a server started without--authentication. username/passwordset → HTTP Basic Auth, matching a server started with--authentication(without--clientAuthentication).- Mutual TLS (
--authentication --ssl --clientAuthentication) is not wired up yet; pass a preconfiguredhttpx.Client(withcert=) via thehttp_clientconstructor argument if needed.
Error handling
All non-2xx responses raise a subclass of EbmsAdapterError
(ebms_adapter_client.exceptions):
EbmsNotFoundError— HTTP 404EbmsBadRequestError— HTTP 400 (message text carries the server's error)EbmsServerError— HTTP 5xxEbmsConnectionError— the server could not be reached at all
Development
uv sync --all-groups
uv run pytest
uv run ruff check .
uv run ruff format --check .
uv run mypy src
See CONTRIBUTING.md for more.
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 ebms_adapter_client-0.3.0.tar.gz.
File metadata
- Download URL: ebms_adapter_client-0.3.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1f374a76d818c804c751abca65b5c241a1c68959e6de529b3797b724d246fd7
|
|
| MD5 |
fe6541fb3ad5a069e773e05fbb18fa26
|
|
| BLAKE2b-256 |
30008e301ff9c64559c4d917dd92a14aa42f55cdaf3bab1a3263912f3d471774
|
Provenance
The following attestation bundles were made for ebms_adapter_client-0.3.0.tar.gz:
Publisher:
publish.yml on Worth-NL/ebms-adapter-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ebms_adapter_client-0.3.0.tar.gz -
Subject digest:
c1f374a76d818c804c751abca65b5c241a1c68959e6de529b3797b724d246fd7 - Sigstore transparency entry: 2234461772
- Sigstore integration time:
-
Permalink:
Worth-NL/ebms-adapter-client@56325483ba8cba676a70900e4fadc944268e42fa -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Worth-NL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56325483ba8cba676a70900e4fadc944268e42fa -
Trigger Event:
release
-
Statement type:
File details
Details for the file ebms_adapter_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: ebms_adapter_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b916601ee8467349ec596d4fe7d3f1d7270cf50de4430b9f19c70f8f03b5f9f3
|
|
| MD5 |
cceb285e1b15173cbe37439b1311b517
|
|
| BLAKE2b-256 |
fc1dd55d602685dcedb2d0cb3171c044abc40aec525524e2c87ded32ad943c58
|
Provenance
The following attestation bundles were made for ebms_adapter_client-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on Worth-NL/ebms-adapter-client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ebms_adapter_client-0.3.0-py3-none-any.whl -
Subject digest:
b916601ee8467349ec596d4fe7d3f1d7270cf50de4430b9f19c70f8f03b5f9f3 - Sigstore transparency entry: 2234462136
- Sigstore integration time:
-
Permalink:
Worth-NL/ebms-adapter-client@56325483ba8cba676a70900e4fadc944268e42fa -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/Worth-NL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@56325483ba8cba676a70900e4fadc944268e42fa -
Trigger Event:
release
-
Statement type: