A Python IRC and API wrapper for Twitch.
Project description
TwitchIO 2.0 is currently in BETA stage looking for testers and users. 2.0 supercedes the current 1.x version.
Although not classified as Stable you should be able to use this release for testing purposes. Use in production is at your own risk.
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.
Documentation
For the Official Documentation: Click Here!
Support
For support using TwitchIO, please join the official support server on Discord.
Installation
TwitchIO 2 requires Python 3.7+. You can download the latest version of Python here.
Windows
py -3.9 -m pip install -U twitchio --pre
Linux
python3.9 -m pip install -U twitchio --pre
Access Tokens
Visit Token Generator for a simple way to generate tokens for use with TwitchIO.
Getting Started
A simple Chat Bot.
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}')
@commands.command()
async def hello(self, ctx: commands.Context):
# Send a hello back!
await ctx.send(f'Hello {ctx.author.name}!')
bot = Bot()
bot.run()
Contributing
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:
If I have forgotten anyone please let me know <3: EvieePy
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
Built Distribution
Hashes for twitchio-2.0.0b4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39c00c14b2f09b182f4b73e81375b5012400eacf2a7643115d97def32021e1fa |
|
MD5 | cf8294ba0115f0ebcc2d68ef41e2f733 |
|
BLAKE2b-256 | d0907b1c0bbdafa825600fe4620c91889208609bfd489c5fb9b781bb6b745b69 |