Skip to main content

No project description provided

Project description

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:

  1. Run an MQTT broker
  2. 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

How to set environment variables in Python?

Project details


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.1.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

dynatalk-0.7.1-py3-none-any.whl (8.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page