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.4.tar.gz (259.2 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.4-py3-none-any.whl (768.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: message_subscriber-0.0.4.tar.gz
  • Upload date:
  • Size: 259.2 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.4.tar.gz
Algorithm Hash digest
SHA256 4ce7b4a73134329f964b620fcedb10f0945d1be864fc59de3bd3cda19d246051
MD5 40e9ad98d958abe0e614d7385d94d797
BLAKE2b-256 b205e15560c05c0e4e1207c6ed29aa717d462e67a90b23909cd3b77c76387e3a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for message_subscriber-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8eb060468c978121badd46ab53a20b0cad351f05db4c6768985d77c761b54db4
MD5 8a7ac91cdc4938626973edac29d5d7cb
BLAKE2b-256 e3867b84495aceae8bce85e648b3ae9833a520a1b7cc9bade38a83a686b344c7

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