Skip to content

Repository files navigation

cb-events

Async Python client for the Chaturbate Events API.

PyPI Tag Python OpenSSF Best Practices Builds License

Provides event polling, typed models, retries, and routing.

Requirements

Python 3.11+

Installation

pip install cb-events

With uv:

uv add cb-events

Quick Start

import asyncio
from cb_events import Event, EventClient, EventType, Router

router = Router()

events_url = "https://eventsapi.chaturbate.com/events/your_username/your_api_token/"


@router.on(EventType.TIP)
async def handle_tip(event: Event) -> None:
    if event.user and event.tip:
        print(f"{event.user.username} tipped {event.tip.tokens} tokens")


async def main() -> None:
    async with EventClient(events_url) as client:
        async for event in client:
            await router.dispatch(event)


asyncio.run(main())

Note

Create an API token at https://chaturbate.com/statsapi/authtoken/ with Events API scope.

Features

  • Async iterator client for long-polling events.
  • Typed event models for tips, chat/messages, follows, broadcasts, and other event types.
  • Router handlers are registered by event type.
  • Retry and rate-limiting support.
  • Client configuration for timeouts, strict validation, and retries.

Links

License

MIT


Not affiliated with Chaturbate.

About

Async Python client for the Chaturbate Events API

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

9 stars

Watchers

0 watching

Forks

Releases

Used by

Contributors

Languages