Skip to main content

Async Python client for the Chaturbate Events API.

Project description

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 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) -> 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. You can create multiple tokens. Deleting a token revokes its access within up to one minute.

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

Project details


Release history Release notifications | RSS feed

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.0.1.tar.gz (255.6 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.0.1-py3-none-any.whl (22.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cb_events-9.0.1.tar.gz
  • Upload date:
  • Size: 255.6 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.0.1.tar.gz
Algorithm Hash digest
SHA256 d33fcd41bf36f950d19c675bacc4e7a8978e4e723d48a86d44fe734cb937ebe2
MD5 92b7649ebbc4b495a5cc6c159a348eef
BLAKE2b-256 6be4d4ba7a883fcd1f38096572e4e980b5feea7612f2e86501ba0fda6ca8a9de

See more details on using hashes here.

Provenance

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

Publisher: ci-cd.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.0.1-py3-none-any.whl.

File metadata

  • Download URL: cb_events-9.0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.7 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.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1dc2a5aea0b1490d68e4bb1fda9b13c847365f2b230c0e862acf2c51d4c1351c
MD5 d1a89b33371deb4f4851567d0b2d2c0a
BLAKE2b-256 568a66c9d4f08e6431afca2bf1d72de0c3b2c46063817d21b7846e87bb9a4fa4

See more details on using hashes here.

Provenance

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

Publisher: ci-cd.yml on MountainGod2/cb-events

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

Supported by

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