{"id":19255907,"url":"https://github.com/carlosfdez/pytmi","last_synced_at":"2025-09-21T11:43:08.873Z","repository":{"id":146969727,"uuid":"100643862","full_name":"CarlosFdez/pytmi","owner":"CarlosFdez","description":"A simple twitch messaging interface parser","archived":false,"fork":false,"pushed_at":"2018-01-26T20:45:16.000Z","size":192,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-05T08:32:35.671Z","etag":null,"topics":["asyncio","chatbot","framework","python","python3","twitch","twitch-irc"],"latest_commit_sha":null,"homepage":"https://carlosfdez.github.io/pytmi/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CarlosFdez.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-17T20:44:59.000Z","updated_at":"2021-11-10T04:21:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"d163aa5f-d74b-48c3-a3f3-80fd58226f7b","html_url":"https://github.com/CarlosFdez/pytmi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosFdez%2Fpytmi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosFdez%2Fpytmi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosFdez%2Fpytmi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CarlosFdez%2Fpytmi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CarlosFdez","download_url":"https://codeload.github.com/CarlosFdez/pytmi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240356062,"owners_count":19788512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["asyncio","chatbot","framework","python","python3","twitch","twitch-irc"],"created_at":"2024-11-09T18:44:21.014Z","updated_at":"2025-09-21T11:43:03.832Z","avatar_url":"https://github.com/CarlosFdez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyTMI\n\nA python library for communicating in the Twitch Messaging Interface ([docs](https://dev.twitch.tv/docs/v5/guides/irc/))\n\n## Why a new library\nUnfortunately, I haven't found a good python library for twitch that was simple, extendable, and scalable. Good libraries exist for Javascript ([tmi.js](https://github.com/tmijs/tmi.js)), but I haven't found something for Python.\n\nWhile Python IRC libraries exist (twitch message interface is a weird IRC), most are too complicated to use, not extendable, don't support asyncio, or are for python 2.\n\nMany of the ideas used in this library came from [discord.py](https://github.com/Rapptz/discord.py), a library for creating bots for discord.\n\n## Example\n\nThis is an example of the core functionality.\n\n```py\nimport pytmi\n\nconfig = {\n    'username': \"botname\",\n    'password': \"oauthstring\",\n    'channels': [\"#channelname\"]\n}\n\nclient = pytmi.TwitchClient()\n\n@client.event\nasync def on_message(message):\n    print(\"Received message\")\n\nclient.run_sync(**config)\n```\n\nThis is an example of the bot command functionality.\n\n```py\nfrom pytmi.bot import TwitchBot\n\nconfig = {\n    'username': \"botname\",\n    'password': \"oauthstring\",\n    'channels': [\"#channelname\"]\n}\n\nclient = pytmi.TwitchBot(prefix='!')\n\n@bot.command()\nasync def hello(ctx):\n    await ctx.reply(\"Hello \" + ctx.author.name)\n\nclient.run_sync(**config)\n```\n\nMore examples are available in the examples/ folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosfdez%2Fpytmi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcarlosfdez%2Fpytmi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcarlosfdez%2Fpytmi/lists"}