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.3.1

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.3.1
File Size Uploaded Provenance Actions
aiotraq_message-0.3.1.tar.gz 8.4 kB With provenance Details for aiotraq_message-0.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 18.2 kB

Release files / aiotraq_message-0.3.1.tar.gz

Download URL aiotraq_message-0.3.1.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cb0831ee325ca30b24df411b690a8128632d2cf5efe337423240da377e377d2e
BLAKE2b-256 checksum
How to use checksums
c690c8afa576ab545541f595483fb87af0f7be6a733f613b2ad8302f0814b370
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 30, 2026.

Transparency log

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

Download URL aiotraq_message-0.3.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73a0af6e7f193d3970eb9788fac61292931beb27519a1163433853552f77efda
BLAKE2b-256 checksum
How to use checksums
be4c43f2fdcb45534ac1526be9256c27e989e0d6d6c748d8420353a7e573c197
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 30, 2026.

Transparency log

Security for aiotraq-message 0.3.1

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.3.1.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 30, 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