Skip to main content

Streamlit component that allows you to subscribe to messages

Project description

MessageSubscriber

概述

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

功能

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

发布

  1. 进入frontent执行npm run build
  2. 进入setup.py目录执行 python setup.py sdist bdist_wheel
  3. 执行运行 Upload PiPy Task

安装

使用 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.3.tar.gz (257.7 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.3-py3-none-any.whl (512.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: message_subscriber-0.0.3.tar.gz
  • Upload date:
  • Size: 257.7 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.3.tar.gz
Algorithm Hash digest
SHA256 5de45f1d035ed24ea134b6ddf89fa8eeceba38c7bf589824825df1f2e1dc9589
MD5 4e8b0f5c518dbb1a98bdf2171c8ce9e0
BLAKE2b-256 ffd75c9271db0032376bae01c1da4475c213faf5d821f1e15b1804126d32821f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for message_subscriber-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 958fc43e363e18e9822524018be546edb770dc267c0ea42bded2795659679f7e
MD5 af96eec0114467f8006e8b0d3482241f
BLAKE2b-256 93be204c9b8178c7c252a47183be6ced1f028e926b7ecc27c8145f9d6262930f

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