.. image:: https://raw.githubusercontent.com/TwitchIO/TwitchIO/master/logo.png :align: center
.. image:: https://img.shields.io/badge/Python-3.7%20%7C%203.8%20%7C%203.9-blue.svg :target: https://www.python.org
.. image:: https://img.shields.io/github/license/TwitchIO/TwitchIO.svg :target: ./LICENSE
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg :target: https://github.com/psf/black
.. image:: https://img.shields.io/pypi/dm/twitchio?color=black :target: https://pypi.org/project/twitchio :alt: PyPI - Downloads
TwitchIO is an asynchronous Python wrapper around the Twitch API and IRC, with a powerful command extension for creating Twitch Chat Bots. TwitchIO covers almost all of the new Twitch API and features support for commands, PubSub, Webhooks, and EventSub.
For the Official Documentation: Click Here! <https://twitchio.dev/>
_
For support using TwitchIO, please join the official support server <https://discord.gg/RAKc3HF>
_ on Discord <https://discord.com/>
_.
|Discord|
.. |Discord| image:: https://img.shields.io/discord/490948346773635102?color=%237289DA&label=Pythonista&logo=discord&logoColor=white :target: https://discord.gg/RAKc3HF
TwitchIO requires Python 3.7+. You can download the latest version of Python here <https://www.python.org/downloads/>
_.
Windows
.. code:: sh
py -m pip install -U twitchio
Linux
.. code:: sh
python -m pip install -U twitchio
Visit Token Generator <https://twitchtokengenerator.com/>
_ for a simple way to generate tokens for use with TwitchIO.
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}')
print(f'User id is | {self.user_id}')
@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()
TwitchIO currently uses the Black <https://black.readthedocs.io/en/stable/>
_ 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 is 120.
For installation and usage of Black visit: Black Formatter <https://black.readthedocs.io/en/stable/usage_and_configuration/>
_
For integrating Black into your IDE visit: Black IDE Usage <https://black.readthedocs.io/en/stable/integrations/editors.html>
_
Thank you to all those who contribute and help TwitchIO grow.
Special thanks to:
LostLuma (Lilly) <https://github.com/LostLuma>
_
Harmon <https://github.com/Harmon758>
_
Tom <https://github.com/IAmTomahawkx>
_
Tesence <https://github.com/tesence>
_
Adure <https://github.com/Adure>
_
Scragly <https://github.com/scragly>
_
Chillymosh <https://github.com/chillymosh>
_
If I have forgotten anyone please let me know <3: EvieePy <https://github.com/EvieePy>
_
AI数字人视频创作平台
Keevx 一款开箱即用的AI数字人视频创作平台,广泛适用于电商广告、企业培训与社媒宣传,让全球企业与个人创作者无需拍摄剪辑,就能快速生成多语言、高质量的专业视频。
一站式AI创作平台
提供 AI 驱动的图片、视频生成及数字人等功能,助力创意创作
AI办公助手,复杂任务高效处理
AI办公助手,复杂任务高效处理。办公效率低?扣子空间AI助手支持播客生成、PPT制作、网页开发及报告写作,覆盖科研、商业、舆情等领域的专家Agent 7x24小时响应,生活工作无缝切换,提升50%效率!
AI辅助编程,代码自动修复
Trae是一种自适应的集成开发环境(IDE),通过自动化和多元协作改变开发流程。利用Trae,团队能够更快速、精确地编写和部署代码,从而提高编程效率和项目交付速度。Trae具备上下文感知和代码自动完成功能,是提升开发效率的理想工具。
AI小说写作助手,一站式润色、改写、扩写
蛙蛙写作—国内先进的AI写作平台,涵盖小说、学术、社交媒体等多场景。提供续写、改写、润色等功能,助力创作者高效优化写作流程。界面简洁,功能全面,适合各类写作者提升内容品质和工作效率。
全能AI智能助手,随时解答生活与工作的多样问题
问小白,由元石科技研发的AI智能助手,快速准确地解答各种生活和工作问题,包括但不限于搜索、规划和社交互动,帮助用户在日常生活中提高效率,轻松管理个人事务。