Skip to main content

Twitch module for Python

Project description

Twitch Python

Discord Build Status

pip install --user twitch-python

An object-oriented approach to accessing the Twitch API and live chat with relationships and smart caching.



# Twitch API

import twitch

helix = twitch.Helix('client-id', 'client-secret')
# Users

for user in helix.users(['sodapoppin', 'reckful', 24250859]):

# Videos

for video in helix.videos([318017128, 317650435]):

# Video Comments (VOD chat)

for comment in

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.user.display_name, message.text))


  • Object-oriented relationships
  • Smart caching
  • New Twitch API (Helix)
  • VOD chat from Twitch API v5

DocumentationTwitch APITwitch-Chat-Downloader

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for twitch-python, version 0.0.19
Filename, size File type Python version Upload date Hashes
Filename, size twitch_python-0.0.19-py3-none-any.whl (30.4 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size twitch-python-0.0.19.tar.gz (27.9 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page