Skip to main content

ebms-adapter-client

PyPI Python versions CI License: MIT uv Ruff mijn | overheid

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.

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) → no Authorization header is sent, matching a server started without --authentication.
  • username/password set → HTTP Basic Auth, matching a server started with --authentication (without --clientAuthentication).
  • Mutual TLS (--authentication --ssl --clientAuthentication) is not wired up yet; pass a preconfigured httpx.Client (with cert=) via the http_client constructor argument if needed.

Error handling

All non-2xx responses raise a subclass of EbmsAdapterError (ebms_adapter_client.exceptions):

  • EbmsNotFoundError — HTTP 404
  • EbmsBadRequestError — HTTP 400 (message text carries the server's error)
  • EbmsServerError — HTTP 5xx
  • EbmsConnectionError — 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.

Metadata

Release files for ebms-adapter-client 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ebms-adapter-client 0.4.0
File Size Uploaded Provenance Actions
ebms_adapter_client-0.4.0.tar.gz 26.8 kB With provenance Details for ebms_adapter_client-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ebms-adapter-client 0.4.0
File Interpreter ABI Platform Actions
ebms_adapter_client-0.4.0-py3-none-any.whl Python 3 none any Details for ebms_adapter_client-0.4.0-py3-none-any.whl

Total release size: 47.2 kB

Release files / ebms_adapter_client-0.4.0.tar.gz

Download URL ebms_adapter_client-0.4.0.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
be6301ae5414854008a4506f3a9c623c3202e6549faf1c3cce9e6be1dd2758ec
BLAKE2b-256 checksum
How to use checksums
eaa2d02bf3bf065ed25857ba3c937de7ea2bde969649cd13feb9226dbd4e80b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / ebms_adapter_client-0.4.0-py3-none-any.whl

Download URL ebms_adapter_client-0.4.0-py3-none-any.whl
Size 20.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2de9358189cf484178d638229dce692fb0e4e25c50abb1a6f7843fffad6d71b3
BLAKE2b-256 checksum
How to use checksums
27549fdeb85808831c7d0ed9be6b48e542c4de16baf45d2d64ac2677d391d311
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for ebms-adapter-client 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ebms_adapter_client-0.4.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page