Skip to main content

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.

Requirements

Usage

# Twitch API

import twitch

helix = twitch.Helix('client-id', 'client-secret')
# 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 (VOD chat)

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 relationships
  • Smart caching
  • New Twitch API (Helix)
  • VOD chat from Twitch API v5

DocumentationTwitch APITwitch-Chat-Downloader

Download files

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

Source Distribution

pillar-twitch-python-0.0.20.tar.gz (27.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pillar_twitch_python-0.0.20-py3-none-any.whl (30.5 kB view details)

Uploaded Python 3

File details

Details for the file pillar-twitch-python-0.0.20.tar.gz.

File metadata

  • Download URL: pillar-twitch-python-0.0.20.tar.gz
  • Upload date:
  • Size: 27.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.1 requests/2.23.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for pillar-twitch-python-0.0.20.tar.gz
Algorithm Hash digest
SHA256 d07ec74b456c0835fcffff3bf095a930cc1a584b89a0a74d166e0e50d2dc6712
MD5 532ad092a3343beaf0092067403bb0a2
BLAKE2b-256 be6cfefa206639bbc3f6d998fd6d40f66c8e88b826d2f1cd79b55ce3abe75c59

See more details on using hashes here.

File details

Details for the file pillar_twitch_python-0.0.20-py3-none-any.whl.

File metadata

  • Download URL: pillar_twitch_python-0.0.20-py3-none-any.whl
  • Upload date:
  • Size: 30.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.6.1 requests/2.23.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for pillar_twitch_python-0.0.20-py3-none-any.whl
Algorithm Hash digest
SHA256 a4d47bd65a6b31f264ae95d6462eb115b548e4ab04db49873aedd83e86ad2ad7
MD5 d87bf4199e0714326ee8f379fdfde22e
BLAKE2b-256 501e4326ac9602f9efd2d900d7075e46d1431089b83a97baa8cd8fd788610c6b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.20 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page