Data plane signaling routers, services, and schemas for the EDC data plane.
Project description
pyedc-dataplane
FastAPI routers, services, and JSON-LD/Pydantic models that implement the EDC data plane signaling API. The package lets you expose the /signaling/v1/dataflows contract that interacts with an Eclipse Dataspace Connector control plane, while keeping the JSON-LD expansion/compaction handled by pyedc-core.
Highlights
- JSON-LD-first router (
pyedc_dataplane.routers.signaling) that acceptsDataFlowStart/Suspend/Terminatemessages and returns the proper acknowledgements orDataFlowResponsepayloads. - Extensible
SignalingServicewith hooks (TransferInstructionConsumer) so you can plug in your own provisioning logic, integrate with Vault, or fan out events. - Repository abstraction with an in-memory implementation to track issued
DataAddressobjects per process; swap it with your own store for production. create_signaling_apihelper that builds a fully-namespaced FastAPI application pre-wired with the router and dependency overrides, mirroring how the sample app inapps/test_apphosts the control API.
Installation
pip install pyedc-dataplane
You will also get pyedc-core, which provides the JSON-LD middleware, constants, and app factory.
Usage
Create a standalone service:
from fastapi import FastAPI
from pyedc_dataplane import create_signaling_api
app: FastAPI = create_signaling_api()
Or mount the router inside your own application:
from fastapi import FastAPI
from pyedc_dataplane.routers import signaling_router
app = FastAPI()
app.include_router(signaling_router, prefix="/control")
Customizing dependencies
create_signaling_api accepts dependency objects directly, but you can also use FastAPI overrides:
from pyedc_dataplane.api import create_signaling_api
from pyedc_dataplane.dependencies import get_instruction_consumer
from my_project.consumer import MyInstructionConsumer
app = create_signaling_api()
app.dependency_overrides[get_instruction_consumer] = lambda: MyInstructionConsumer()
Implement the TransferInstructionConsumer protocol to point to your storage endpoints, mint tokens, or forward START/SUSPEND/TERMINATE events to other systems. Provide your own TransferRepository to persist state anywhere (Postgres, Redis, etc.).
Development & tests
Run the package tests with pytest:
pytest packages/pyedc-dataplane/tests
The tests exercise the router, service layer, and signaling integration contract. Use them as a starting point when adding new message types or persistence implementations.
Related packages
pyedc-coresupplies the JSON-LD middleware, HTTP client, and FastAPI helpers used throughout this package.pyedcis an optional meta-package that depends on both the core and dataplane libraries if you prefer a single install.
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 pyedc_dataplane-0.1.0.tar.gz.
File metadata
- Download URL: pyedc_dataplane-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45b769544334ba7f73d9127562f949873a22a4aa75d1eac39d9511990ca4c087
|
|
| MD5 |
bd5a2bd9449bc8c073fe752d86e88d1e
|
|
| BLAKE2b-256 |
b1a9df0fd61a97ac752c8aac4ab26b440e532b9401da0e09f19740d0a5c22558
|
File details
Details for the file pyedc_dataplane-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyedc_dataplane-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1c1b5d3c2ec44fe2661c0b27a88dab6881556ee009942a51f4ebd9bf786820ce
|
|
| MD5 |
c7d7cc1d52e328a26424cd76e7d97498
|
|
| BLAKE2b-256 |
6b1eb765ccf731214d4b20ec53444acd9f5c18051dafa7426b45c625bf1a75fc
|