Skip to content

kirchesz/aiotw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aiotw

aiotw is a small, asynchronous library for working with Twitch.


Warning

PROJECT STILL UNDER DEVELOPMENT! We do not recommend using this project in production BEFORE v1.0! Any update can broke previous functionallity!

Implemented APIs

  • IRC
  • Helix
  • EventSub.

Requirements

  • Python >= 3.11

Quick start

Install

pip install aiotw

IRC

Simple client example

import asyncio
from aiotw import irc


client = irc.Client(auth_token='oauth:...', auth_nickname='mybot')
# or you can use anonymous client
client = irc.create_anonymous_client()


@client.on(irc.PrivmsgMessage)
async def on_privmsg(msg: irc.PrivmsgMessage):
    print(f'[{msg.channel}] <{msg.user}>: {msg.message}')

    # send privmsg will not work if you use anonymous client!
    if not client.is_anonymous:
      await client.send(irc.PrivmsgMessage(channel=msg.channel, message=msg.message))


async def main():
    async with client:
        await client.send(irc.JoinMessage(channel='some_channel'))
        await client.serve()


asyncio.run(main())

See irc sources for details.

Helix

Not implemented yet.

EventPub

Not implemented yet.

License

This project is released under the MIT License — see the LICENSE file for the full text.

About

Asynchronous library for working with Twitch.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages