Skip to main content

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.10+

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())

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cb_events-9.2.0.tar.gz (213.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cb_events-9.2.0-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

File details

Details for the file cb_events-9.2.0.tar.gz.

File metadata

  • Download URL: cb_events-9.2.0.tar.gz
  • Upload date:
  • Size: 213.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cb_events-9.2.0.tar.gz
Algorithm Hash digest
SHA256 86b6ca04e0b20d327df3634e9aa7db501ca63712bbb1d8ca3369a5d8bd5b4554
MD5 61697bf01dda2dccb06f7dde2ee3f060
BLAKE2b-256 15e908da2e5504018dcd792d4f00b1cc6348b84da52eb9a4d422874d058236c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cb_events-9.2.0.tar.gz:

Publisher: release.yml on MountainGod2/cb-events

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cb_events-9.2.0-py3-none-any.whl.

File metadata

  • Download URL: cb_events-9.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for cb_events-9.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81d5b961fc988a38a37b3efcc9e34323e44efe34475380e14fe79db49a375522
MD5 0bea8d99628b98144cce8568e7d0fe0a
BLAKE2b-256 06bef3f86c5e97f80fd6b6e022d443e1419c52ff24db830db631310abdab3c27

See more details on using hashes here.

Provenance

The following attestation bundles were made for cb_events-9.2.0-py3-none-any.whl:

Publisher: release.yml on MountainGod2/cb-events

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page