Async Python client for the Chaturbate Events API.
Project description
CB Events
Async Python client for the Chaturbate Events API.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cb_events-9.0.0.tar.gz.
File metadata
- Download URL: cb_events-9.0.0.tar.gz
- Upload date:
- Size: 255.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6b8c0d3fe82054fb89e3ef28dc127a92c1f4e1f4b8b2dfd0b2f70218f89a6e1
|
|
| MD5 |
edc7e8ee7ddae430b9a7f0a16ce72cdd
|
|
| BLAKE2b-256 |
9888f30105db633b7fe958e915615eac820550317bbb13f3b07aee56be4e9025
|
Provenance
The following attestation bundles were made for cb_events-9.0.0.tar.gz:
Publisher:
ci-cd.yml on MountainGod2/cb-events
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cb_events-9.0.0.tar.gz -
Subject digest:
e6b8c0d3fe82054fb89e3ef28dc127a92c1f4e1f4b8b2dfd0b2f70218f89a6e1 - Sigstore transparency entry: 1570118370
- Sigstore integration time:
-
Permalink:
MountainGod2/cb-events@93c7e8041e1c2bc53925bbc9c3a087c70b34ac1d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MountainGod2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@93c7e8041e1c2bc53925bbc9c3a087c70b34ac1d -
Trigger Event:
push
-
Statement type:
File details
Details for the file cb_events-9.0.0-py3-none-any.whl.
File metadata
- Download URL: cb_events-9.0.0-py3-none-any.whl
- Upload date:
- Size: 22.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0166ecffc60b6d23eb7f1f8e4648ea5c9fbb129ca02d602a5601a43bcd6d8880
|
|
| MD5 |
bf227ea03c5b17ca6c5a61e7825e49db
|
|
| BLAKE2b-256 |
4dd00010897eda0bd01e3b7eea71fbed7f1e493047f7ccb892c35c6d2e783502
|
Provenance
The following attestation bundles were made for cb_events-9.0.0-py3-none-any.whl:
Publisher:
ci-cd.yml on MountainGod2/cb-events
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cb_events-9.0.0-py3-none-any.whl -
Subject digest:
0166ecffc60b6d23eb7f1f8e4648ea5c9fbb129ca02d602a5601a43bcd6d8880 - Sigstore transparency entry: 1570118420
- Sigstore integration time:
-
Permalink:
MountainGod2/cb-events@93c7e8041e1c2bc53925bbc9c3a087c70b34ac1d -
Branch / Tag:
refs/heads/main - Owner: https://github.com/MountainGod2
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci-cd.yml@93c7e8041e1c2bc53925bbc9c3a087c70b34ac1d -
Trigger Event:
push
-
Statement type: