Skip to main content

Asynchronous library for working with Twitch.

Project description

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.

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

aiotw-0.1.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

aiotw-0.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file aiotw-0.1.tar.gz.

File metadata

  • Download URL: aiotw-0.1.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for aiotw-0.1.tar.gz
Algorithm Hash digest
SHA256 2b2dd556372bcfb0bfcb62b681716d326115045d4c2c81a591cb5d33af4f6b0c
MD5 9b659f7f9076997898b82930e52251b2
BLAKE2b-256 91a0bb2018c6fda94f943d34b2cec8d8819809dec6eec03026479d69f3d132ae

See more details on using hashes here.

File details

Details for the file aiotw-0.1-py3-none-any.whl.

File metadata

  • Download URL: aiotw-0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.1

File hashes

Hashes for aiotw-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a8da3edaa3da6546da3b1ea7917bc908cb3100e726bd43ed23016bcd792dcebb
MD5 43b8be0f1353fe712edf11ef3f0ae45f
BLAKE2b-256 8f51a10956aef0465765c1e4e0f176777159c5359b9e4e26095b8bdd9e5ac414

See more details on using hashes here.

Supported by

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