Awesome Open Source
Awesome Open Source

.. image:: ./logo.png?raw=true :align: center

.. image:: :target:

.. image:: :target: ./LICENSE

.. image:: :target:

TwitchIO 2.0 is currently in a BETA stage looking for testers and users. 2.0 supercedes the current 1.2.3 version.

TwitchIO is an asynchronous Python wrapper around the Twitch API and IRC, with a powerful command extension for creating Twitch Chat Bots. TwitchIO 2 will cover 100% of the new Twitch API and will feature support for commands, PubSub and Webhooks.

TwitchIO 2.0 will be buggy, will be lacking some features and you will run into problems here and there, that is the nature of BETA software, by using 2.0 you are helping test and develop TwitchIO by providing us with valuable feedback, feature requests and bug reports.


For the Official Documentation: Click Here! <>_


For support using TwitchIO, please join the official support server <>_ on Discord <>_.


.. |Discord| image:: :target:


TwitchIO 2 requires Python 3.7+. You can download the latest version of Python here <>_.


.. code:: sh

py -3.9 -m pip install -U twitchio


.. code:: sh

python3.9 -m pip install -U twitchio

Access Tokens

Visit Token Generator <>_ for a simple way to generate tokens for use with TwitchIO.

Getting Started

A simple Chat Bot.

.. code:: python

from twitchio.ext import commands

class Bot(commands.Bot):

    def __init__(self):
        # Initialise our Bot with our access token, prefix and a list of channels to join on boot...
        super().__init__(token='ACCESS_TOKEN', prefix='?', initial_channels=['...'])

    async def event_ready(self):
        # We are logged in and ready to chat and use commands...
        print(f'Logged in as | {self.nick}')

    async def hello(self, ctx: commands.Context):
        # Send a hello back!
        await ctx.send(f'Hello {}!')

bot = Bot()


TwitchIO 2.0 currently uses the Black <>_ formatter to enforce sensible style formatting.

Before creating a Pull Request it is encouraged you install and run black on your code.

The Line Length limit for TwitchIO 2.0 is 120.

For installation and usage of Black visit: Black Formatter <>_

For integrating Black into your IDE visit: Black IDE Usage <>_

Special Thanks

Thank you to all those who contribute and help TwitchIO grow.

Special thanks to:

SnowyLuma <>_

Harmon <>_

Tom <>_

Tesence <>_

Adure <>_

Scragly <>_

If I have forgotten anyone please let me know <3: EvieePy <>_

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (55,394
api (1,757
python3 (1,677
async (496
wrapper (235
twitch (90
bot-framework (66