Skip to main content

Streamlit component that allows you to subscribe to messages

Project description

MessageSubscriber

概述

MessageSubscriber 是一个用于处理消息订阅的组件。它允许应用程序接收和处理来自不同消息源的实时消息。

功能

  • 实时消息接收: 通过 WebSocket 或其他协议实时接收消息。
  • 消息处理: 提供灵活的消息处理机制,可以根据消息类型执行不同的操作。
  • 错误处理: 内置错误处理机制,确保在消息接收过程中出现问题时能够妥善处理。

安装

使用 npm 或 yarn 安装组件:

npm install message_subscriber
# 或者
yarn add message_subscriber

使用示例

import MessageSubscriber from 'message_subscriber';

const App = () => {
    return (
        <MessageSubscriber onMessage={(msg) => console.log(msg)} />
    );
};

API

Props

  • onMessage: (function) 当接收到新消息时调用的回调函数。
  • url: (string) 消息源的 URL。

贡献

欢迎任何形式的贡献!请查看 贡献指南 以获取更多信息。

许可证

该项目遵循 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

message_subscriber-0.0.1.tar.gz (257.6 kB view details)

Uploaded Source

Built Distribution

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

message_subscriber-0.0.1-py3-none-any.whl (258.6 kB view details)

Uploaded Python 3

File details

Details for the file message_subscriber-0.0.1.tar.gz.

File metadata

  • Download URL: message_subscriber-0.0.1.tar.gz
  • Upload date:
  • Size: 257.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for message_subscriber-0.0.1.tar.gz
Algorithm Hash digest
SHA256 5334d24d426cb97f6e0f355a024f156239b8fdab0af5e73cb1a300be6a703b15
MD5 d79dc76568b73337eaf548205c8e177f
BLAKE2b-256 75040195639efccff5a8ea067c3ce338a6f96c2b394b5c1be776a12d91de97db

See more details on using hashes here.

File details

Details for the file message_subscriber-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for message_subscriber-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 98b608f6d2f89a447c2d6563c4724390b84383c7117d74f97e6d8f3debe9b4d2
MD5 bd6d66e1f519a2403c27ce2f7a0db161
BLAKE2b-256 1bf32062bf8dbd63a08e61a330e0d5d330bc1ce67eef726cc9bd93ae068fc012

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