Sen descrición

TheCodemancer 88f75885a0 Retag release as 0.4.2 to match Chatto server version hai 3 meses
.beans 2dcc9dac14 Rewrite chattolib for Chatto 0.4.x Connect API hai 3 meses
src 2dcc9dac14 Rewrite chattolib for Chatto 0.4.x Connect API hai 3 meses
tests 2dcc9dac14 Rewrite chattolib for Chatto 0.4.x Connect API hai 3 meses
.beans.yml afd27f241a Update for Chatto v0.1.0-beta.3 schema hai 4 meses
.gitignore f8250695c7 Add PyPI metadata and build artifacts to gitignore hai 6 meses
CLAUDE.md 88f75885a0 Retag release as 0.4.2 to match Chatto server version hai 3 meses
LICENSE c73577aeac Add README, MIT license, and PyPI long description hai 6 meses
README.md 88f75885a0 Retag release as 0.4.2 to match Chatto server version hai 3 meses
pyproject.toml 88f75885a0 Retag release as 0.4.2 to match Chatto server version hai 3 meses

README.md

chattolib

Unofficial async Python client library for the Chatto webchat API.

Chattolib versions track the Chatto server version they target. 0.4.2 targets Chatto 0.4.2's ConnectRPC API. The upstream server dropped GraphQL in favour of a protobuf-first Connect API (see ADR-042 in chattocorp/chatto), and this release is a full rewrite for that transport. The library speaks Connect JSON over HTTP; realtime WebSocket support is a follow-up.

Install

pip install chattolib

Quick start

import asyncio
from chattolib import ChattoClient

async def main():
    # Public discovery — no auth required
    async with ChattoClient() as anon:
        profile, login = await anon.get_server()
        print(f"Chatto {profile.version}: {profile.name}")

    # Authenticated calls
    async with await ChattoClient.login("username", "password") as client:
        me = await client.me()
        print(f"Logged in as {me.display_name}")

        for entry in await client.list_rooms():
            if entry.room:
                print(f"  - {entry.room.name}")

asyncio.run(main())

Escape hatch

ChattoClient.call(service, method, request) invokes any Connect RPC by full service name, e.g. await client.call("chatto.api.v1.MessageService", "GetMessage", {"roomId": ..., "eventId": ...}).

License

MIT