{"id":13758515,"url":"https://github.com/DaCasBe/TwitchPy","last_synced_at":"2025-05-10T08:30:33.201Z","repository":{"id":45195763,"uuid":"308958289","full_name":"DaCasBe/TwitchPy","owner":"DaCasBe","description":"TwitchPy is a Python package for using the Twitch's API and create bots for interacting with their IRC chats.","archived":false,"fork":false,"pushed_at":"2025-03-08T16:13:42.000Z","size":1488,"stargazers_count":35,"open_issues_count":1,"forks_count":8,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T14:12:44.447Z","etag":null,"topics":["api","bot","irc","irc-bot","irc-client","package","python","python-twitch-api","python3","twitch","twitch-api","twitch-bot","twitchpy"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DaCasBe.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":"2020-10-31T19:36:32.000Z","updated_at":"2025-03-24T03:37:20.000Z","dependencies_parsed_at":"2024-11-16T15:32:29.026Z","dependency_job_id":"d0ce2680-060e-4ffd-ab04-a15da428bb7e","html_url":"https://github.com/DaCasBe/TwitchPy","commit_stats":{"total_commits":42,"total_committers":2,"mean_commits":21.0,"dds":0.09523809523809523,"last_synced_commit":"00d18508dcbcf18cdc05f69ee551b5fef4f8d128"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaCasBe%2FTwitchPy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaCasBe%2FTwitchPy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaCasBe%2FTwitchPy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaCasBe%2FTwitchPy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaCasBe","download_url":"https://codeload.github.com/DaCasBe/TwitchPy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389433,"owners_count":21900761,"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":["api","bot","irc","irc-bot","irc-client","package","python","python-twitch-api","python3","twitch","twitch-api","twitch-bot","twitchpy"],"created_at":"2024-08-03T13:00:31.613Z","updated_at":"2025-05-10T08:30:32.454Z","avatar_url":"https://github.com/DaCasBe.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Python"],"readme":"# TwitchPy\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-green.svg)](https://github.com/DaCasBe/TwitchPy/blob/master/LICENSE)\n[![Formatter: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Pypi downloads](https://img.shields.io/pypi/dm/twitchpy?color=blue)](https://pypi.org/project/twitchpy)\n\nTwitchPy is a Python package for using the Twitch's API and create bots for interacting with their IRC chats.\n\n## Documentation\n\nClick [here](https://dacasbe.github.io/TwitchPy/) to see the official documentation.\n\n## Installation\n\nTwitchPy requires Python 3.10 or higher. You can download the latest version of Python [here](https://www.python.org/downloads/).\n\n~~~\npip install twitchpy\n~~~\n\n## Getting started\n\nA basic bot.\n\n~~~```python\nfrom datetime import datetime\n\nfrom twitchpy.bot import Bot\n\nbot = Bot(\n    \"your_oauth_token\",\n    \"your_client_id\",\n    \"your_client_secret\",\n    \"your_redirect_uri\",\n    \"tokens_file_path\",\n    \"login_of_your_bot\",\n    [\"channels_list_to_read_from\"],\n    \"!\",\n)\n\ntime = datetime.now()\n\n\ndef example_check():\n    global time\n\n    time_diff = datetime.now() - time\n\n    if time_diff.seconds \u003e= 5:\n        bot.me(\"any_channel_login\", \"This message is sent every 5 seconds\")\n        time = datetime.now()\n\n\ndef example_listener(message):\n    if message.user is not None:\n        bot.me(\"any_channel_login\", f\"{message.user} said: {message.text}\")\n\n\ndef example_command(message):\n    bot.me(\"any_channel_login\", f\"{message.user} is who called me\")\n\n\nbot.add_check(\"example_check\", example_check)\nbot.add_listener(\"example_listener\", example_listener)\nbot.add_command(\"example_command\", example_command)\n\nbot.run()\n~~~\n\n## Contributing\n\nTwitchPy currently uses the Black formatter to enforce sensible style formatting.\n\nBefore creating a pull request it is encouraged you install and run black on your code.\n\nThe line length limit for TwitchPy is 88.\n\nFor installation and usage of Black visit: [Black Formatter](https://black.readthedocs.io/en/stable/usage_and_configuration/)\n\nFor integrating Black into your IDE visit: [Black IDE Usage](https://black.readthedocs.io/en/stable/integrations/editors.html)\n\n## Contact\n\nYou can contact me through my [e-mail](mailto:dacasbe97@gmail.com).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDaCasBe%2FTwitchPy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FDaCasBe%2FTwitchPy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FDaCasBe%2FTwitchPy/lists"}