Goat plugin for dpsn-plugin
Project description
Dpsn Plugin for GOAT SDK
This plugin enables goat-agents to connect , subscribe to, and interact with data streams available on the DPSN Data Streams MarketPlace.
Agents can leverage this plugin to consume real-time data for decision-making, reacting to events, or integrating external information feeds.
To provide personalized data streams for your agents, you can create and publish data into your own DPSN topics using the dpsn-client for node.
For more information, visit:
✨ Features
- Seamless Integration: Connect your GOAT agents to DPSN's decentralized pub/sub network
- Real-time Data Processing: Subscribe to and process real-time data streams in your agents
- Topic Management: Subscribe and unsubscribe to DPSN topics programmatically or through llm queries
- Event-based Architecture: Use event handlers to handle incoming messages efficiently
Installation
# Install the plugin
poetry add goat-sdk-plugin-dpsn
Usage
from goat_plugins.dpsn import dpsn,DpsnPluginOptions
# setup a message callback handler to consume incoming messages from topic subscription
def handle_message(message:Dict[str,Any]):
return message
# Initialize the plugin
options = DpsnPluginOptions(
dpsn_url="betanet.dpsn.org",
evm_wallet_pvt_key="ethereum_pvt_key",# can use any ethrereum compliant pvt , just used for authentication purpose
handle_message
)
plugin = dpsn_plugin(options)
# subscribe to topic
plugin.subscribe("0xe14768a6d8798e4390ec4cb8a4c991202c2115a5cd7a6c0a7ababcaf93b4d2d4/BTCUSDT/ticker")
#unsubscribe to topic
plugin.unsubscribe("0xe14768a6d8798e4390ec4cb8a4c991202c2115a5cd7a6c0a7ababcaf93b4d2d4/BTCUSDT/ticker")
Tools
- Subscribe to a dpsn topic
- Unsubscribe to a dpsn topic
License
This project is licensed under the terms of the MIT license.
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 goat_sdk_plugin_dpsn-0.1.0.tar.gz.
File metadata
- Download URL: goat_sdk_plugin_dpsn-0.1.0.tar.gz
- Upload date:
- Size: 4.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f66875a01404aa97b06a5ccc33568ead54896fba6ac9d73c4070c117656fced7
|
|
| MD5 |
7d1c8762f11188e763fb41e99b449a19
|
|
| BLAKE2b-256 |
f58a07c08d5974c6f31ec5eee9bc2d5dc2983c2f02ced78065a8bad35c53d62b
|
File details
Details for the file goat_sdk_plugin_dpsn-0.1.0-py3-none-any.whl.
File metadata
- Download URL: goat_sdk_plugin_dpsn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.10.16 Linux/6.8.0-1021-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6df5006b68c8af7309da42030042859c030443176ec73c64592a213786619766
|
|
| MD5 |
d156bb51dd624e5b3b5e36f67e524f7e
|
|
| BLAKE2b-256 |
41b4134859966df5af52c3ee5176e5bc519d16b4467a130d23dd3cb9e3a610ae
|