Skip to main content

AiotraQ-Message

streamlit 風の構文を用いてインタラクティブなメッセージ送信に対応するプラグインです。

PyPI - Version GitHub license CI

Installation

pip install aiotraq-message

Requirements

AiotraQ-Message は AiotraQ に依存しています

overview

Usage

import os
import asyncio
from aiotraq_bot import TraqHttpBot
from aiotraq_message import TraqMessage

async def component(am: TraqMessage, payload: str):
    am.write("Hello, World!")
    am.write(payload)

    with am.spinner():
        # heavy task
        asyncio.sleep(3)

    am.write(":done: Done!")

bot = TraqHttpBot(verification_token=os.getenv("BOT_VERIFICATION_TOKEN"))
response = TraqMessageManager(bot, os.getenv("BOT_ACCESS_TOKEN"), "https://q.trap.jp/api/v3", "https://q.trap.jp")


@bot.event("MESSAGE_CREATED")
async def on_message_created(payload) -> None:
    channel_id = payload.message.channelId
    message = payload.message.plainText

    await response(component, channnel_id=channel_id, payload=message)

if __name__ == "__main__":
    bot.run(port=8080)

Component

write, spinner, clear などのメソッドを使うことができます

  • write: メッセージを送信します
  • spinner: スピナーを表示します
  • clear: 送信したメッセージを空にします
  • clear_message: write で送信したメッセージ 1 つを削除します
  • image: 画像を送信します
  • pyplot: matplotlib のグラフを送信します
  • dataframe: pandas の dataframe を表形式で表示します

詳細: ドキュメント| Components

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for aiotraq-message 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiotraq-message 0.2.6
File Size Uploaded Provenance Actions
aiotraq_message-0.2.6.tar.gz 8.6 kB With provenance Details for aiotraq_message-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiotraq-message 0.2.6
File Interpreter ABI Platform Actions
aiotraq_message-0.2.6-py3-none-any.whl Python 3 none any Details for aiotraq_message-0.2.6-py3-none-any.whl

Total release size: 18.4 kB

Release files / aiotraq_message-0.2.6.tar.gz

Download URL aiotraq_message-0.2.6.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
70a415d33482bda86842e57068bb63266b3911b151774ade08cb2ec42687809c
BLAKE2b-256 checksum
How to use checksums
7cb3c17b60315b5905d7a6e2f2100e8e03596c4f084dd48c3b097d085c1f6c0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / aiotraq_message-0.2.6-py3-none-any.whl

Download URL aiotraq_message-0.2.6-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f662d2a2a408a56ec54f07af109e8578b3e240f46c4a0d85c226806053817b02
BLAKE2b-256 checksum
How to use checksums
28aaac80749e706eeab85b669a3ba2802674d6acba5dbebd67c92a580f93b45d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for aiotraq-message 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aiotraq_message-0.2.6.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page