Twitch module for Python
Project description
Twitch Python
pip install twitch-python
Twitch Python provides API data to PetterKraabol/Twitch-Chat-Downloader.
Requirements
Usage
# Twitch API
import twitch
helix = twitch.Helix('client-id')
# Users
for user in helix.users('sodapoppin', 'reckful', 24250859):
print(user.display_name)
print(helix.user('zarlach').display_name)
# Videos
for video in helix.videos([318017128, 317650435]):
print(video.title)
print(helix.video(318017128).title)
# Video Comments
for comment in helix.video(318017128).comments():
print(comment.commenter.display_name)
for video, comments in helix.videos([318017128, 317650435]).comments():
for comment in comments:
print(comment.commenter.display_name, comment.message.body)
for video, comments in helix.user('sodapoppin').videos().comments():
for comment in comments:
print(comment.commenter.display_name, comment.message.body)
for user, videos in helix.users('sodapoppin', 'reckful').videos(first=5):
for video, comments in videos.comments():
for comment in comments:
print(comment.commenter.display_name, comment.message.body)
# Twitch Chat
twitch.Chat(channel='#sodapoppin', nickname='zarlach', oauth='oauth:xxxxxx').subscribe(
lambda message: print(message.channel, message.user().display_name, message.text))
Features
- Object oriented
- New Twitch API (Helix)
- VOD chat from Twitch API v5
- Optional cache
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
twitch-python-0.0.10.tar.gz
(9.8 kB
view hashes)
Built Distribution
Close
Hashes for twitch_python-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ddbb9e06e27b7af6c9022ae461dc6691e3e39e9e25465bf8df88a8f39ee0f98c |
|
MD5 | 0bb054684c64d1b72fc9aef838045154 |
|
BLAKE2b-256 | fb9ce923306ae8f88dc69455142d243d8e6d85554f9f8a704eba4212f7868e5e |