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.2.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.2-py3-none-any.whl (512.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: message_subscriber-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 0bc017fe82b46eed36116454b8ab4675069946f3900f7aa8d5a839b53ed71188
MD5 fe2b101efa8d30098c6a39f028f44294
BLAKE2b-256 d86fef541d517344dce6eb3603215c167fb3a41950cd597af0fb4ec0d90adabe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for message_subscriber-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f1214fb9edd5f4975ecbf15bca14ec12c0544d24b4b5d8073fd02e2d20387ed
MD5 37b00a6050fbdde825954936154afb49
BLAKE2b-256 0655b5338bed4be7e4b97f78c68f25615ce95bde7c39492e00d939eacd69ef4e

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