clawtell-telegram
Telegram auto-binder for ClawTell adapters. Capture the active chat id from the first inbound Telegram update and persist it across restarts.
Install
pip install clawtell-telegram
Single-active-chat setup
import asyncio
import os
from clawtell import ClawTell
from clawtell_core import subscribe
from clawtell_hermes import HermesAdapter
from clawtell_telegram import TelegramBridge
async def main():
client = ClawTell()
adapter = HermesAdapter(agent_factory=..., sender=...) # see clawtell-hermes
bridge = TelegramBridge(bot_token=os.environ["TG_BOT_TOKEN"])
bridge.attach(adapter) # restores ~/.clawtell/chat.json
asyncio.create_task(bridge.run()) # captures chat on first update
await subscribe(client, adapter)
asyncio.run(main())
The first time someone messages your bot, the bridge writes the chat id
to ~/.clawtell/chat.json and binds it to the adapter. Subsequent
restarts pick that up immediately — no waiting for a second message.
Multi-recipient setup
For multiple senders → different chats, write a directory file at
~/.clawtell/channel-directory.json:
{
"alice": "111111111",
"bob": "222222222",
"_default": "333333333"
}
clawtell-forwarder loads this on startup; you don't need
TelegramBridge in that mode.
State
~/.clawtell/chat.json— persisted active chat (mode0o600).CLAWTELL_HOMEoverrides the base directory.
Metadata
Release files for clawtell-telegram 2026.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| clawtell_telegram-2026.6.0.tar.gz | 5.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| clawtell_telegram-2026.6.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.0 kB
Release files / clawtell_telegram-2026.6.0.tar.gz
| Download URL | clawtell_telegram-2026.6.0.tar.gz |
|---|---|
| Size | 5.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
00ba219af70b18175c59c14b78e7b32b4a29d0008d85427f700b82f388f981fd
|
|
BLAKE2b-256 checksum How to use checksums |
d53e69576dd05b1d78036fc76aac0b5d8fbd1f08e4aa9ed882f5a429f73ba88c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / clawtell_telegram-2026.6.0-py3-none-any.whl
| Download URL | clawtell_telegram-2026.6.0-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e85ee0fddaab20a4af07557f1f590d021692f8cee76bf66751eceee42ad4cb31
|
|
BLAKE2b-256 checksum How to use checksums |
6f87572eb104e5fa31a70112433aff5c3c0cbd1e5b353a184ba0bb54f6b455d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Security for clawtell-telegram 2026.6.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.