3tears-channels
A unified message protocol for the 3tears framework, with adapters for Slack, Discord, and WebSocket clients. Write your agent logic once and deliver it across channels.
pip install 3tears-channels
What you get
- One message model --
ChannelMessage,ChannelResponse,ChannelDeliveryMessage, andAttachmentcarry a request and its reply regardless of channel. - Routing --
ChannelRouterandStreamingChannelRouterdispatch inbound messages and stream responses back. - Slack and Discord -- payload and rich-formatting builders (
build_slack_blocks,build_slack_payload,build_discord_embed,build_discord_payload) plus ashould_use_rich_formattinghelper. - WebSocket --
WebSocketHandler,WebSocketProtocol, aConnectionRegistry, and frame primitives for real-time clients. - Rooms and presence --
RoomFanout,RoomState,RoomIndexCollection, and a three-tier-backedPresenceCollectionwith aPresenceSweeperfor connection liveness. - Email --
threetears.channels.mail:Mailerover anEmailTransport, an SMTP transport reading its settings per send,EmailTemplatesubstitution with an HTML alternative andList-Unsubscribeheaders,send_batchfor many recipients with per-recipient failure isolation, andBounceReceiverfor HMAC-verified delivery reports. A sibling of the channel adapters rather than one of them -- an email recipient has no conversation and usually no account, soChannelDeliveryMessagedoes not apply.
Quickstart
from threetears.channels import ChannelRouter, ChannelMessage, build_slack_blocks
router = ChannelRouter(...)
response = await router.dispatch(ChannelMessage(text="hello", channel="slack", ...))
blocks = build_slack_blocks(response)
License
MIT. See LICENSE.
Release files for 3tears-channels 0.46.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| 3tears_channels-0.46.1.tar.gz | 166.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 3tears_channels-0.46.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 265.3 kB
Release files / 3tears_channels-0.46.1.tar.gz
| Download URL | 3tears_channels-0.46.1.tar.gz |
|---|---|
| Size | 166.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
000ecae89af04b1594ef0de148a0cf0bf11373b66f965860a876a9d6e43c76f8
|
|
BLAKE2b-256 checksum How to use checksums |
acde4444bd7336bda011858357544ad6b176bca9bf97e8c7dd1ca8679fd63e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 20, 2026.
Transparency logRelease files / 3tears_channels-0.46.1-py3-none-any.whl
| Download URL | 3tears_channels-0.46.1-py3-none-any.whl |
|---|---|
| Size | 98.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
34b47685dae58ae2564985d17fe7c8eb29e4db92da09b224db1bc549e0781e20
|
|
BLAKE2b-256 checksum How to use checksums |
953bc0e54cc2898da5319fe1fe898edd5bb6edddb1449595437f59662aea03b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 20, 2026.
Transparency log