dynatalk-py
This repository is the Python client of Dynatalk.
Dynatalk focuses on communication among objects, especially concerning interoperability among different languages/environments. -- Dynatalk.
To use Dynatalk, you need to:
- Run an MQTT broker
- Start programming with the dynatalk client.
Install
pip install dynatalk
get started
from dynatalk import Supervisor, PyDemoAgent
supervisor = Supervisor()
# The agent object can work as a server (providing services to other agents) or work as a client (requesting services from other agents).
agent = PyDemoAgent("PyDemoAgent") # PyDemoAgent provides two services: add, echo
supervisor.addAgent(agent)
# As a **client**, agent requests PyDemoAgent to execute add, the parameters are [1, 2]
agent.request("PyDemoAgent", "add", [1 ,2])
# agent.request("LivelyDemoAgent", "add", [1, 2])
# Unlike request, sendTo does not require a response
# agent.sendTo...
to discover agents on the current network:
agent.broadcastHelp()
time.sleep(1)
print(agent.availableActions)
CLi tools
dynatalk message monitor
dynatalk-monitor
FAQ
Set up MQTT
Use environment variables to set up MQTT.
default is:
MQTT_HOST: 127.0.0.1
MQTT_PORT: 1883
MQTT_USERNAME: guest
MQTT_PASSWORD: test
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dynatalk-0.7.3.tar.gz
(6.5 kB
view details)
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 dynatalk-0.7.3.tar.gz.
File metadata
- Download URL: dynatalk-0.7.3.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.5.1 CPython/3.11.7 Darwin/23.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e71f962955a2de0c89f5b933a3c3afa912c605d44adaa40d7e31e773bfae0f4
|
|
| MD5 |
f9d4f16af34681560edd6faafc7de85b
|
|
| BLAKE2b-256 |
a406a45f49a1af4446025886763426a84bd7d57ad1b1ec5fb52ab27537778fd4
|
File details
Details for the file dynatalk-0.7.3-py3-none-any.whl.
File metadata
- Download URL: dynatalk-0.7.3-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.5.1 CPython/3.11.7 Darwin/23.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89023ac9f779f9f3f9dd4ef00fdd662ccc9246520b8cf070b15a5600ef0beef9
|
|
| MD5 |
0f75a42524213f9809b87a34a9d326e9
|
|
| BLAKE2b-256 |
b0d5689c3d1c8438c6ec025010e252f8f72841268a4f4de8a5d10a97b22bdb2d
|