Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

goat_sdk_plugin_dpsn-0.1.0.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

goat_sdk_plugin_dpsn-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

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

Hashes for goat_sdk_plugin_dpsn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f66875a01404aa97b06a5ccc33568ead54896fba6ac9d73c4070c117656fced7
MD5 7d1c8762f11188e763fb41e99b449a19
BLAKE2b-256 f58a07c08d5974c6f31ec5eee9bc2d5dc2983c2f02ced78065a8bad35c53d62b

See more details on using hashes here.

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

Hashes for goat_sdk_plugin_dpsn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6df5006b68c8af7309da42030042859c030443176ec73c64592a213786619766
MD5 d156bb51dd624e5b3b5e36f67e524f7e
BLAKE2b-256 41b4134859966df5af52c3ee5176e5bc519d16b4467a130d23dd3cb9e3a610ae

See more details on using hashes here.

Supported by

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