Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Python library and CLI tool for polling events from the Chaturbate API featuring asynchronous event handling, structured logging, and optional InfluxDB integration for analytics and monitoring.
Ensure Python 3.11 or later is installed, then install the package via pip:
pip install chaturbate-poller
Create a .env
file in your project's root directory with the following:
CB_USERNAME="your_chaturbate_username"
CB_TOKEN="your_chaturbate_token"
INFLUXDB_URL="http://influxdb:8086"
INFLUXDB_TOKEN="your_influxdb_token"
INFLUXDB_ORG="chaturbate-poller"
INFLUXDB_BUCKET="my-bucket"
USE_DATABASE="false" # Set to `true` if InfluxDB is used
💡 Tip: Generate an API token here with "Events API" permission enabled.
Start the poller with the following command:
python -m chaturbate_poller start --username <your_username> --token <your_token>
--username
: Your Chaturbate username. Defaults to .env
file value.--token
: Your API token. Defaults to .env
file value.--timeout
: Timeout for API requests (default: 10 seconds).--database
: Enable InfluxDB integration. Defaults to disabled.--testbed
: Enable the testbed environment for testing.--verbose
: Enable detailed logging for debugging.Run python -m chaturbate_poller --help
for a complete list of options.
To run the poller in Docker, pull the image and start the container:
docker pull ghcr.io/mountaingod2/chaturbate_poller:latest
docker run \
-e CB_USERNAME="your_chaturbate_username" \
-e CB_TOKEN="your_chaturbate_token" \
ghcr.io/mountaingod2/chaturbate_poller:latest --verbose --database
The library can also be used directly in your Python code:
import asyncio
from chaturbate_poller import ChaturbateClient
async def main():
async with ChaturbateClient("your_username", "your_token", testbed=False) as client:
url = None
while True:
response = await client.fetch_events(url)
for event in response.events:
# Do something with the event
print(event.model_dump())
url = response.next_url
if __name__ == "__main__":
asyncio.run(main())
Clone the repository:
git clone https://github.com/MountainGod2/chaturbate_poller.git
cd chaturbate_poller
Install dependencies using uv:
uv sync --all-extras
Run tests with pytest
:
uv run pytest
Build and preview the documentation locally:
uv sync --extra=docs
uv run make clean html -C ./docs
Contributions are welcome! Here's how to get started:
This project is licensed under the MIT License. See the LICENSE file for details.
FAQs
Python library for interacting with the Chaturbate Events API
We found that chaturbate-poller demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.