Name | chaturbate-poller JSON |
Version |
5.1.8
JSON |
| download |
home_page | None |
Summary | Python library for interacting with the Chaturbate Events API |
upload_time | 2025-08-18 23:53:37 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.12 |
license | None |
keywords |
api
chaturbate
poller
python
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Chaturbate Poller
[](https://chaturbate-poller.readthedocs.io/en/stable/)
[](https://pypi.org/project/chaturbate-poller/)
[](https://www.python.org/downloads/)
[](https://github.com/MountainGod2/chaturbate_poller/actions/workflows/cd.yml/)
[](https://app.codecov.io/gh/MountainGod2/chaturbate_poller/)
[](https://github.com/MountainGod2/chaturbate_poller)
Python library and CLI for monitoring Chaturbate Events API. Real-time event tracking with automatic error handling and optional InfluxDB integration.
## Features
- **Real-time event monitoring** - Chat messages, tips, room status changes, and user interactions
- **Robust error handling** - Automatic retries with exponential backoff and connection recovery
- **Structured data output** - Clean event formatting with type-safe models
- **Database integration** - Optional InfluxDB support for analytics and time-series data
- **Flexible configuration** - Environment variables, CLI options, or programmatic setup
## Installation
### Using uv (recommended)
```bash
uv pip install chaturbate-poller
```
### Using pip
```bash
pip install chaturbate-poller
```
### CLI without installation
```bash
uvx chaturbate_poller start
```
### API Token
Generate your API token at [https://chaturbate.com/statsapi/authtoken/](https://chaturbate.com/statsapi/authtoken/) with "Events API" permission.
## Quick Start
### CLI Usage
```bash
# Direct credentials
chaturbate_poller start --username your_username --token your_token
# Testbed environment
chaturbate_poller start --testbed --verbose
# Environment configuration
chaturbate_poller start
```
### Environment Configuration
Create a `.env` file in your project root:
```ini
CB_USERNAME="your_chaturbate_username"
CB_TOKEN="your_chaturbate_token"
# Optional InfluxDB configuration
INFLUXDB_URL="http://influxdb:8086"
INFLUXDB_TOKEN="your_influxdb_token"
INFLUXDB_ORG="chaturbate-poller"
INFLUXDB_BUCKET="events"
```
## Usage
### CLI Options
```bash
chaturbate_poller start [OPTIONS]
```
Key options:
- `--username TEXT` - Chaturbate username
- `--token TEXT` - API token
- `--timeout FLOAT` - Request timeout in seconds (default: 10.0)
- `--database` - Enable InfluxDB integration
- `--testbed` - Use testbed environment
- `--verbose` - Enable detailed logging
### Docker
```bash
docker run -e CB_USERNAME="username" -e CB_TOKEN="token" \
ghcr.io/mountaingod2/chaturbate_poller:latest --verbose
```
### Docker Compose
```bash
cp .env.example .env
# Configure credentials in .env
docker-compose up -d
```
## Programmatic Usage
### Basic Client
```python
import asyncio
from chaturbate_poller import ChaturbateClient
async def main():
async with ChaturbateClient("username", "token") as client:
url = None
while True:
response = await client.fetch_events(url)
for event in response.events:
print(f"Event: {event.method}")
print(event.model_dump_json(indent=2))
url = response.next_url
asyncio.run(main())
```
### Event Handling
```python
from chaturbate_poller import ChaturbateClient, format_message
async def process_events():
async with ChaturbateClient("username", "token") as client:
url = None
while True:
response = await client.fetch_events(url)
for event in response.events:
if event.method == "tip":
amount = event.object.tip.tokens
user = event.object.user.username
print(f"Tip: {user} -> {amount} tokens")
elif event.method == "chatMessage":
message = format_message(event)
print(f"Chat: {message}")
url = response.next_url
```
## InfluxDB Integration
Enable with `--database` flag to store events for analytics. See [sample queries](https://github.com/MountainGod2/chaturbate_poller/tree/main/influxdb_queries.flux) for data analysis examples.
## Development
```bash
git clone https://github.com/MountainGod2/chaturbate_poller.git
cd chaturbate_poller
uv sync --all-extras
uv run pytest
```
## Documentation
- [API Reference](https://chaturbate-poller.readthedocs.io/)
- [Examples and Tutorials](https://chaturbate-poller.readthedocs.io/)
## Contributing
Pull requests welcome. Fork the repository, create a feature branch, add tests, and submit a PR.
## License
[MIT License](https://github.com/MountainGod2/chaturbate_poller/tree/main/LICENSE)
Raw data
{
"_id": null,
"home_page": null,
"name": "chaturbate-poller",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "api, chaturbate, poller, python",
"author": null,
"author_email": "MountainGod2 <admin@reid.ca>",
"download_url": "https://files.pythonhosted.org/packages/bf/f3/3ea36fd8cd7cc803a4e0f18bbde7ea13e06dc53a07630d4669e8837e4404/chaturbate_poller-5.1.8.tar.gz",
"platform": null,
"description": "# Chaturbate Poller\n\n[](https://chaturbate-poller.readthedocs.io/en/stable/)\n[](https://pypi.org/project/chaturbate-poller/)\n[](https://www.python.org/downloads/)\n[](https://github.com/MountainGod2/chaturbate_poller/actions/workflows/cd.yml/)\n[](https://app.codecov.io/gh/MountainGod2/chaturbate_poller/)\n[](https://github.com/MountainGod2/chaturbate_poller)\n\nPython library and CLI for monitoring Chaturbate Events API. Real-time event tracking with automatic error handling and optional InfluxDB integration.\n\n## Features\n\n- **Real-time event monitoring** - Chat messages, tips, room status changes, and user interactions\n- **Robust error handling** - Automatic retries with exponential backoff and connection recovery\n- **Structured data output** - Clean event formatting with type-safe models\n- **Database integration** - Optional InfluxDB support for analytics and time-series data\n- **Flexible configuration** - Environment variables, CLI options, or programmatic setup\n\n## Installation\n\n### Using uv (recommended)\n\n```bash\nuv pip install chaturbate-poller\n```\n\n### Using pip\n\n```bash\npip install chaturbate-poller\n```\n\n### CLI without installation\n\n```bash\nuvx chaturbate_poller start\n```\n\n### API Token\n\nGenerate your API token at [https://chaturbate.com/statsapi/authtoken/](https://chaturbate.com/statsapi/authtoken/) with \"Events API\" permission.\n\n## Quick Start\n\n### CLI Usage\n\n```bash\n# Direct credentials\nchaturbate_poller start --username your_username --token your_token\n\n# Testbed environment\nchaturbate_poller start --testbed --verbose\n\n# Environment configuration\nchaturbate_poller start\n```\n\n### Environment Configuration\n\nCreate a `.env` file in your project root:\n\n```ini\nCB_USERNAME=\"your_chaturbate_username\"\nCB_TOKEN=\"your_chaturbate_token\"\n\n# Optional InfluxDB configuration\nINFLUXDB_URL=\"http://influxdb:8086\"\nINFLUXDB_TOKEN=\"your_influxdb_token\"\nINFLUXDB_ORG=\"chaturbate-poller\" \nINFLUXDB_BUCKET=\"events\"\n```\n\n## Usage\n\n### CLI Options\n\n```bash\nchaturbate_poller start [OPTIONS]\n```\n\nKey options:\n- `--username TEXT` - Chaturbate username\n- `--token TEXT` - API token \n- `--timeout FLOAT` - Request timeout in seconds (default: 10.0)\n- `--database` - Enable InfluxDB integration\n- `--testbed` - Use testbed environment\n- `--verbose` - Enable detailed logging\n\n### Docker\n\n```bash\ndocker run -e CB_USERNAME=\"username\" -e CB_TOKEN=\"token\" \\\n ghcr.io/mountaingod2/chaturbate_poller:latest --verbose\n```\n\n### Docker Compose\n\n```bash\ncp .env.example .env\n# Configure credentials in .env\ndocker-compose up -d\n```\n\n## Programmatic Usage\n\n### Basic Client\n\n```python\nimport asyncio\nfrom chaturbate_poller import ChaturbateClient\n\nasync def main():\n async with ChaturbateClient(\"username\", \"token\") as client:\n url = None\n while True:\n response = await client.fetch_events(url)\n for event in response.events:\n print(f\"Event: {event.method}\")\n print(event.model_dump_json(indent=2))\n url = response.next_url\n\nasyncio.run(main())\n```\n\n### Event Handling\n\n```python\nfrom chaturbate_poller import ChaturbateClient, format_message\n\nasync def process_events():\n async with ChaturbateClient(\"username\", \"token\") as client:\n url = None\n while True:\n response = await client.fetch_events(url)\n for event in response.events:\n if event.method == \"tip\":\n amount = event.object.tip.tokens\n user = event.object.user.username\n print(f\"Tip: {user} -> {amount} tokens\")\n elif event.method == \"chatMessage\":\n message = format_message(event)\n print(f\"Chat: {message}\")\n url = response.next_url\n```\n\n## InfluxDB Integration\n\nEnable with `--database` flag to store events for analytics. See [sample queries](https://github.com/MountainGod2/chaturbate_poller/tree/main/influxdb_queries.flux) for data analysis examples.\n\n## Development\n\n```bash\ngit clone https://github.com/MountainGod2/chaturbate_poller.git\ncd chaturbate_poller\nuv sync --all-extras\nuv run pytest\n```\n\n## Documentation\n\n- [API Reference](https://chaturbate-poller.readthedocs.io/)\n- [Examples and Tutorials](https://chaturbate-poller.readthedocs.io/)\n\n## Contributing\n\nPull requests welcome. Fork the repository, create a feature branch, add tests, and submit a PR.\n\n## License\n\n[MIT License](https://github.com/MountainGod2/chaturbate_poller/tree/main/LICENSE)\n",
"bugtrack_url": null,
"license": null,
"summary": "Python library for interacting with the Chaturbate Events API",
"version": "5.1.8",
"project_urls": {
"changelog": "https://github.com/MountainGod2/chaturbate_poller/blob/main/CHANGELOG.md",
"documentation": "https://mountaingod2.github.io/chaturbate_poller/",
"homepage": "https://github.com/MountainGod2/chaturbate_poller",
"issues": "https://github.com/MountainGod2/chaturbate_poller/issues",
"repository": "https://github.com/MountainGod2/chaturbate_poller"
},
"split_keywords": [
"api",
" chaturbate",
" poller",
" python"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "0ee75495c0756aa29946065bac36fa1a7cf2fad04f413463dedb9305befbb916",
"md5": "3d57d2530a0dddc0dca802c90a4cb971",
"sha256": "1e886f9526c59c6ca1847bbd5892c3d60cd989d3e8fbc6fab76054d72c7e0caf"
},
"downloads": -1,
"filename": "chaturbate_poller-5.1.8-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3d57d2530a0dddc0dca802c90a4cb971",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 31501,
"upload_time": "2025-08-18T23:53:35",
"upload_time_iso_8601": "2025-08-18T23:53:35.873027Z",
"url": "https://files.pythonhosted.org/packages/0e/e7/5495c0756aa29946065bac36fa1a7cf2fad04f413463dedb9305befbb916/chaturbate_poller-5.1.8-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bff33ea36fd8cd7cc803a4e0f18bbde7ea13e06dc53a07630d4669e8837e4404",
"md5": "cadc0743bb38e64285ec20a069fdd64a",
"sha256": "de25552af2a06f6d5dcdb7ee38b862f91ec9cba333d8b05e8ae551c657414baa"
},
"downloads": -1,
"filename": "chaturbate_poller-5.1.8.tar.gz",
"has_sig": false,
"md5_digest": "cadc0743bb38e64285ec20a069fdd64a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 236316,
"upload_time": "2025-08-18T23:53:37",
"upload_time_iso_8601": "2025-08-18T23:53:37.618682Z",
"url": "https://files.pythonhosted.org/packages/bf/f3/3ea36fd8cd7cc803a4e0f18bbde7ea13e06dc53a07630d4669e8837e4404/chaturbate_poller-5.1.8.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-18 23:53:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MountainGod2",
"github_project": "chaturbate_poller",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "chaturbate-poller"
}