@@ -192,6 +192,48 @@ dg = d.recv_from()
192192# Returns: {"src_addr": "...", "src_port": 8080, "dst_port": 9090, "data": ...}
193193```
194194
195+ ### Data Exchange Service (Port 1001)
196+
197+ ``` python
198+ # Send a message (text, JSON, or binary)
199+ result = d.send_message(" other-agent" , b " hello" , msg_type = " text" )
200+ # Returns: {"sent": 5, "type": "text", "target": "0:0001.0000.0002", "ack": "..."}
201+
202+ # Send a file
203+ result = d.send_file(" other-agent" , " /path/to/file.txt" )
204+ # Returns: {"sent": 1234, "filename": "file.txt", "target": "0:0001.0000.0002", "ack": "..."}
205+ ```
206+
207+ ### Event Stream Service (Port 1002)
208+
209+ ``` python
210+ # Publish an event
211+ result = d.publish_event(" other-agent" , " sensor/temperature" , b ' {"temp": 25.5}' )
212+ # Returns: {"status": "published", "topic": "sensor/temperature", "bytes": 15}
213+
214+ # Subscribe to events (generator)
215+ for topic, data in d.subscribe_event(" other-agent" , " sensor/*" , timeout = 30 ):
216+ print (f " { topic} : { data} " )
217+
218+ # Subscribe with callback
219+ def handle_event (topic , data ):
220+ print (f " Event: { topic} -> { data} " )
221+
222+ d.subscribe_event(" other-agent" , " *" , callback = handle_event, timeout = 30 )
223+ ```
224+
225+ ### Task Submit Service (Port 1003)
226+
227+ ``` python
228+ # Submit a task for execution
229+ task = {
230+ " task_description" : " process data" ,
231+ " parameters" : {" input" : " data.csv" }
232+ }
233+ result = d.submit_task(" other-agent" , task)
234+ # Returns: {"status": 200, "task_id": "...", "message": "Task accepted"}
235+ ```
236+
195237### Configuration
196238
197239``` python
@@ -242,20 +284,7 @@ cd sdk/python
242284python -m pytest tests/ -v
243285```
244286
245- 47 tests cover all wrapper methods, error handling, and library discovery.
246-
247- ## Development
248-
249- ``` bash
250- # Build shared library
251- make sdk-lib
252-
253- # Install SDK in development mode
254- cd sdk/python && pip install -e .
255-
256- # Run tests
257- pytest tests/ -v
258- ```
287+ 61 tests cover all wrapper methods, error handling, and library discovery.
259288
260289## Development
261290
0 commit comments